I have looked at http://developer.android.com/resources/dashboard/platform-versions.html
2.1 : 27.2%
2.2 : 63.9%
2.3 : 0.8%
2.3.3 : 1.7%
3.0 : 0.2%
I am pretty sure I will use Android 2.1 as my version, covering almost 94% of current users. When I go to set up an android application in eclipse, I see this screen
The documentation says
Min SDK Version
This value specifies the minimum API Level required by your application.
What does that mean? 开发者_StackOverflow中文版Does that mean I can pick 2.3 for my build target, but select 7 as the min sdk version and have all devices running 2.1 supported?
I found a similar post ( Android Min SDK Version vs. Target SDK Version ). Here's part of the answer:
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.
You're correct. The application simply won't install on devices with lower API level. And won't be visible in Android Market for such devices.
Here are listed all API levels: http://developer.android.com/guide/appendix/api-levels.html
It is my understanding that the "Min SDK Version" controls whether or not your users receive the "This application is not supported" message box. For example, if they were running 1.6 (API 4) and you inserted a 7 in that box.... they'll receive the message regardless of whether or not you've checked the 1.6 box.
I never quite understood why it appears that this can be arbitrarily set. I think it's set up that way to allow the developer to build against multiple targets and features without being forced to have compatibility with only one SDK version.
min-sdk=7 (Android 2.1) means your app cannot be installed in device with API level 6 (android 2.0.1) or below (1.5 or 1.6). Of course you can install your app in device with API level 7 or above ( > 2.1).
精彩评论