Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android Application Version - Min SDK Version

I have looked at http://developer.android.com/resources/dashboard/platform-versions.html

enter image description here

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

new android project

The documentation says

Min SDK Version

This value specifies the minimum API Level required by your application.

What does that mean? 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?

like image 286
Josh Avatar asked Apr 14 '11 15:04

Josh


3 Answers

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.

like image 42
tamarintech Avatar answered Sep 27 '22 20:09

tamarintech


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.

like image 181
pecka85 Avatar answered Sep 27 '22 20:09

pecka85


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

like image 41
pawelzieba Avatar answered Sep 27 '22 20:09

pawelzieba