Minimum SDK、Target SDK、Compile SDK区分

官方描述:
  • Minimum Required SDK is the lowest version of Android that your app supports, indicated using the API level. To support as many devices as possible, you should set this to the lowest version available that allows your app to provide its core feature set. If any feature of your app is possible only on newer versions of Android and it's not critical to the app's core feature set, you can enable the feature only when running on the versions that support it (as discussed in Supporting Different Platform Versions). Leave this set to the default value for this project.
  • Target SDK indicates the highest version of Android (also using the API level) with which you have tested with your application.

    As new versions of Android become available, you should test your app on the new version and update this value to match the latest API level in order to take advantage of new platform features.

  • Compile With is the platform version against which you will compile your app. By default, this is set to the latest version of Android available in your SDK. (It should be Android 4.1 or greater; if you don't have such a version available, you must install one using the SDK Manager). You can still build your app to support older versions, but setting the build target to the latest version allows you to enable new features and optimize your app for a great user experience on the latest devices.
1.Minimum SDK Version:app支持的最低版本,低于这个版本的设备无法运行你的app;所以尽量使这个版本能小于等于市场近乎100%的设备Android版本.
 2.  Target SDK Version:app支持的最高版本,运行时api版本,向前兼容;最好使用最新版本,每次使用最新版本时都需要测试;
 3.  Compile SDK Version:编译时SDk, 最好使用最新版本;如果你的Target SDK Version低于最新Version,但你又要使用该版本之后的新特性,你可       以使用Support Library ,那么你的 Compile SDK Version就是你的新特性的version。
综合来看:
minSdkVersion <= targetSdkVersion <= compileSdkVersion

最好:
minSdkVersion (lowest possible) <= targetSdkVersion == compileSdkVersion (latest SDK)
用较低的 minSdkVersion 来覆盖最大的人群,用最新的 SDK 设置 target 和 compile 来获得最新特性。
转自:

  • 2
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值