【Android每周专题】Android中maxSdkVersion、minSdkVersion、targetSdkVersion、以及project.properties中的target

本系列文章均为A2BGeek原创,转载务必在明显处注明:

转载自A2BGeek的【Android每周专题】系列,原文链接:http://blog.csdn.net/a2bgeek/article/details/8203583

maxSdkVersion和minSdkVersion

1、maxSdkVersion

程序被安装的时候,如果目标设备的API版本大于maxSdkVersion,程序将无法安装;或者手机OTA升级后都需要检查升级前已有的程序,如果程序的maxSdkVersion小于手机当前的API版本,那么将被删除。官方文档的原话是:In either case, if the application's maxSdkVersion attribute is lower than the API Level used by the system itself, then the system will not allow the application to be installed. In the case of re-validation after system update, this effectively removes your application from the device.

细心的开发者也许会发现,升级过SDK之后(我的是4.3的SDK),新创建的应用程序已经没有这个属性了,为什么呢?

首先,新版本的系统是完全向后兼容的,你没有必要设置这个属性去阻止你的程序安装在新平台上。http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels

  • 1
    点赞
  • 6
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值