Android 最小 SDK 版本与目标 SDK 版本 [英] Android Min SDK Version vs. Target SDK Version

查看:36
本文介绍了Android 最小 SDK 版本与目标 SDK 版本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

说到为 Android 开发应用程序,Min 和 Target SDK 版本有什么区别?除非 Min 和 Target 版本相同,否则 Eclipse 不会让我创建新项目!

When it comes to developing applications for Android, what is the difference between Min and Target SDK version? Eclipse won't let me create a new project unless Min and Target versions are the same!

推荐答案

android:minSdkVersion

android:minSdkVersion

一个整数,指定应用程序运行所需的最低 API 级别.如果系统的 API Level 低于此属性中指定的值,Android 系统将阻止用户安装应用程序.您应该始终声明此属性.

An integer designating the minimum API Level required for the application to run. The Android system will prevent the user from installing the application if the system's API Level is lower than the value specified in this attribute. You should always declare this attribute.

android:targetSdkVersion

android:targetSdkVersion

一个整数,指定应用程序所针对的 API 级别.

An integer designating the API Level that the application is targetting.

设置此属性后,应用程序表示它能够在旧版本(低至 minSdkVersion)上运行,但经过明确测试,可以使用此处指定的版本.指定此目标版本允许平台禁用目标版本不需要的兼容性设置(否则可能会打开以保持向前兼容性)或启用旧应用程序不可用的更新功能.这并不意味着您可以为平台的不同版本编写不同的功能——它只是通知平台您已经针对目标版本进行了测试,并且平台不应执行任何额外的工作来保持与目标版本的向前兼容性.

With this attribute set, the application says that it is able to run on older versions (down to minSdkVersion), but was explicitly tested to work with the version specified here. Specifying this target version allows the platform to disable compatibility settings that are not required for the target version (which may otherwise be turned on in order to maintain forward-compatibility) or enable newer features that are not available to older applications. This does not mean that you can program different features for different versions of the platform—it simply informs the platform that you have tested against the target version and the platform should not perform any extra work to maintain forward-compatibility with the target version.

有关更多信息,请参阅此 URL:

For more information refer this URL:

http://developer.android.com/guide/主题/清单/uses-sdk-element.html

这篇关于Android 最小 SDK 版本与目标 SDK 版本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆