简体   繁体   English

使 Android 应用程序兼容 Kitkat 及以上版本

[英]Making android app compatible with Kitkat and above versions

I am new to android .我是 android 新手。 I want to have an app does gives backward compatibility also means it should support versions from kitkat and above.我想要一个应用程序确实提供了向后兼容性,这也意味着它应该支持 kitkat 及更高版本的版本。 If I make Project build target(Properties --> Android) to Android 5.0 (API-21) then it means it will run in lollipop only?如果我将 Project build target(Properties --> Android) 设置为 Android 5.0 (API-21) 那么这意味着它只能在棒棒糖中运行吗? If I want to add support library then which library should I import right now I have seen people importing appcompat v7 library for lollipop development.如果我想添加支持库,那么我现在应该导入哪个库,我已经看到有人导入 appcompat v7 库用于棒棒糖开发。 I know this one is quite basic question.我知道这是一个非常基本的问题。

Just write Minimum sdk version in your manifest file只需在清单文件中写入最低 sdk 版本

<uses-sdk
        android:minSdkVersion="19"
        android:targetSdkVersion="21" />

Just set minSdkVersion and targetSdkVersion in app gradle file.只需在应用程序 gradle 文件中设置 minSdkVersion 和 targetSdkVersion 即可。

android {
    compileSdkVersion 23
    buildToolsVersion "23.0.2"

    defaultConfig {
        applicationId "guard.proguard"
        minSdkVersion 19
        targetSdkVersion 23
        versionCode 1
        versionName "1.0"
    }

}

You control the compatibility in the manifest file.您可以控制清单文件中的兼容性。

    <uses-sdk
    android:minSdkVersion="15"
    android:targetSdkVersion="22" />

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Android应用制作2.2版本,但不兼容2.2+版本 - Android app making 2.2 version but not compatible for 2.2+ versions 是否可以使Android HCE向后兼容(对于低于4.4 / KitKat的版本)? - Is it possible to make Android HCE backward compatible (for versions below 4.4/KitKat)? 如何在kitkat以上的android版本中以编程方式自动接听电话 - How to auto receive calls programatically in android versions above kitkat Android应用程式无法在kitkat版本中运作,但在次要版本中运作 - Android app not working in kitkat version but working in lesser versions android KITKAT和旧版本的问题 - issue with android KITKAT and older versions 与旧版Android兼容 - Compatible with older versions of Android 当我尝试在Android Kitkat 4.4.4中启动时,应用程序崩溃,但在Android 5和6版本中正常运行 - App crashes when I try to launch in Android Kitkat 4.4.4 but works fine in Android 5 & 6 versions 如何使Gradle Android应用程序与以上api版本兼容 - How to make a gradle android app compatible with above api version Geocoder在kitkat以上版本的android中不起作用 - Geocoder is not working in android above kitkat version 如何以编程方式在Android(KitKat及更高版本)中添加APN - How to add APN in Android (KitKat and above) programmatically
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM