Skip to content

Android Error – Application Does Not Specify an API Level

Fix the Android warning "Application does not specify an API level requirement" by adding minSdkVersion to your Manifest.xml, so you can publish to the Market.

Ramón Invarato
This appears in the Log when the application starts:
Eclipse console screenshot with the warning that the application does not specify an API level (device API 7)
With the following telltale line in the Log:
WARNING: Application does not specify an API level requirement!
Although it lets you run the application in the emulator, it’s important to fix it so you can upload the application to the Market.

Solution

You fix it in the “Manifest.xml” file, right after the opening <manifest> declaration line, by adding this line:
<uses-sdk android:minSdkVersion=“n” />
Screenshot of AndroidManifest.xml with the uses-sdk android:minSdkVersion="7" line highlighted to fix the warning
Where n is the API version, which corresponds to the platform version used. You can find the correspondences here: page with the Android API levels
In the example in the images, 7 was added, which corresponds to the version used to create that application, which is Android 2.1.

“Android Error – Application Does Not Specify an API Level” by Ramón Invarato at jarroba.com, licensed under Creative Commons Attribution-NonCommercial-ShareAlike 3.0. Registered at Safe Creative.

Ramón Invarato

I design and build data platforms and intelligent systems, and I enjoy sharing that experience here.

You may also like

Comments

Leave a comment


This site uses Akismet to reduce spam. Learn how your comment data is processed.