Android Min SDK版本与目标SDK版本 [英] Android Min SDK Version vs. Target SDK Version
问题描述
在Android开发应用程序方面,Min和Target SDK版本有什么区别? Eclipse不会让我创建一个新项目,除非Min和Target版本是一样的!
android:minSdkVersion
一个整数,指定应用程序运行所需的最小API级别。如果系统的API级别低于此属性中指定的值,Android系统将阻止用户安装应用程序。您应该始终声明此属性。
android:targetSdkVersion
指定应用程序所针对的API级别。
使用此属性设置,应用程序表示可以在旧版本(最低到最小版本)上运行,但是明确测试使用这里指定的版本。指定此目标版本允许平台禁用目标版本不需要的兼容性设置(否则可能会打开以保持向前兼容性)或启用旧应用程序不可用的较新功能。这并不意味着您可以为不同版本的平台编程不同的功能 - 它只需通过平台就目标版本进行测试,平台不应执行额外的工作,以保持与目标版本的前向兼容性。 / p>
有关详细信息,请参阅此URL:
http://developer.android.com/guide/topics/manifest/uses-sdk-element.html
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
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
An integer designating the API Level that the application is targetting.
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.
For more information refer this URL:
http://developer.android.com/guide/topics/manifest/uses-sdk-element.html
这篇关于Android Min SDK版本与目标SDK版本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!