开发者

Android Project Build Target

I have an existing app that has a minimum android:minSdkVersion of Android 2.1 I noticed my app runs sluggish on Tablet Androids (3.0+) so I wanted to enable the hardware acceleration that was added in Android 3.0.

Where I am confused in in eclipse under project Properties-> Android I was originally selecting Android 2.2 (API 8) but in order for the new hardware acceleration to work I need to select Android 3.0 (API 11). My question is what is the risk in switching my Project Build Target to Android 3.0? And in general should I just be releasing compiled with the latest Project Build Target? What are other people doing? Do you just always release开发者_如何学JAVA with the latest API?

I tried searching quite a bit but can only find discussions on android:minSdkVersion and android:targetSdkVersion but not anything on the actual Android API used in the build.

Thanks for any help


I think you have not read documentation

http://developer.android.com/guide/topics/manifest/uses-sdk-element.html

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.

android:maxSdkVersion

An integer designating the maximum API Level on which the application is designed to run. In Android 1.5, 1.6, 2.0, and 2.0.1, the system checks the value of this attribute when installing an application and when revalidating the application after a system update. In either case, if the application's android: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 revalidation after system update, this effectively removes your application from the device.

Future versions of Android (beyond Android 2.0.1) will no longer check or enforce the android:maxSdkVersion attribute during installation or revalidation. Android Market will continue to use the attribute as a filter, however, when presenting users with applications available for download.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜