Not targeting the latest versions of Android

前端 未结 6 1038
独厮守ぢ
独厮守ぢ 2020-12-13 03:35

I have a warning when trying to test theme on latest Android SDK Package 4.2.

Here is my manifest file:



        
6条回答
  •  春和景丽
    2020-12-13 04:22

    This lint message is telling you that compatibility mode will be automatically applied to any features you may have used that are not available in later versions than your declared targetSdkVersion of 16 (and, it is also telling you that there are such later versions - e.g., 17).

    These automatic compatibility mode adjustments may not be as ideal as what you could accomplish yourself by using whatever features were added in later (than level 16) versions to replace the functionality of the level 16 ones that you may have used, which have been removed in later versions (if any). But everything should still continue to work in later versions (due to the adjustments made by the compatibility code that is automatically applied for running on versions higher than your declared targetSdkVersion's API level); it just may not work as well as your own custom detection of, and use of, the new features (when your app detects that it is running in the later versions that have those features) would have worked.

    Here is a discussion, with examples, of minSdkLevel vs. targetSdkLevel:

    Android Min SDK Version vs. Target SDK Version

    Another thing you will want to consider is the relationship of the Project Build Target (the level of the SDK used to compile your app) to the targetSdkLevel:

    Difference between "Build Target SDK" in Eclipse and android:targetSdkVersion in AndroidManifest.xml?

提交回复
热议问题