Setting Android versions in AndroidManifest.xml

Hi, Although I haven’t worked with Android for quite a while, but It seems this topic is quite popular, so therefore I am “obliged” to post another Android blog.

In the AndroidManifest.xml file it is important to declare the correct <uses-sdk>. When developing Android applications, please note of the API level you are using in the development. The correct API level is determined during the creation of the project. API levels may have some issues when running the application. The API levels are declared in the <uses-sdk> of the AndroidManifest.xml.

Here’s an example:


This means that minimum API level to run this application is version 8 , which in this case is  2.2.x FROYO.  This level should match the API level you set when the project is created. Then we should also indicate target API level, and in this example we set it to 18, which is 4.3 JELLY_BEAN_MR2. In this case target sdk is backward compatible to min sdk, and in this example, the application was deployed/tested in a API level 18 device.

Here’s the complete documentation from Google and the API level chart, In where we can see which version corresponds to it’s API level.

NOTE: A mistake in <uses-sdk> will cause some of your applications to crash and may not succeed in some test scenarios.

Platform Version API Level VERSION_CODE Notes
Android 4.4 19 KITKAT Platform Highlights
Android 4.3 18 JELLY_BEAN_MR2 Platform Highlights
Android 4.2, 4.2.2 17 JELLY_BEAN_MR1 Platform Highlights
Android 4.1, 4.1.1 16 JELLY_BEAN Platform Highlights
Android 4.0.3, 4.0.4 15 ICE_CREAM_SANDWICH_MR1 Platform Highlights
Android 4.0, 4.0.1, 4.0.2 14 ICE_CREAM_SANDWICH
Android 3.2 13 HONEYCOMB_MR2
Android 3.1.x 12 HONEYCOMB_MR1 Platform Highlights
Android 3.0.x 11 HONEYCOMB Platform Highlights
Android 2.3.4
Android 2.3.3
10 GINGERBREAD_MR1 Platform Highlights
Android 2.3.2
Android 2.3.1
Android 2.3
Android 2.2.x 8 FROYO Platform Highlights
Android 2.1.x 7 ECLAIR_MR1 Platform Highlights
Android 2.0.1 6 ECLAIR_0_1
Android 2.0 5 ECLAIR
Android 1.6 4 DONUT Platform Highlights
Android 1.5 3 CUPCAKE Platform Highlights
Android 1.1 2 BASE_1_1
Android 1.0 1 BASE



Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s