开发者

What happens if the minSdkVersion is lower than the targetSdkVersion?

I am getting the warn开发者_如何学运维ing:

Attribute minSdkVersion (3) is lower than the project target API level (8)

How will this affect my app?


You can safely ignore the warning.

It's a weird warning - it means you are using tools for API level 8 (Android 2.2/Froyo) but targeting API level 3 (Android 1.5/Cupcake). That warning will always come up unless you you were using the SDK to target the Android release it coincides with - in this case, you would have to target Android 2.2 with your current SDK.


I do most of my development with the project set to the minSdkVersion level. That pretty much guarantees that I'm not using any more recent APIs. I then switch to my targetSdkVersion level before publishing the app. The only problem I've run into so far is that the lower level doesn't support some manifest syntax that I need to use in production. (Level 3, for instance, doesn't support targetSdkVersion.) I just fix up the manifest after switching to the higher level.


See also Dianne Hackborn's response in this thread: https://groups.google.com/group/android-developers/browse_thread/thread/c468e795daf439f8?pli=1#

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜