I am following a tutorial for creating a simple application in Android, and compiling it with Eclipse on Linux.
The problem is that when I first created the project, I used the target API 14. But my tablet only has API 13, so I have changed it in project > properties > android
to API 13. Even though I still get next the error:
ERROR: Application requires API version 14. Device API version is 13 (Android 3.2.1)
Why is this happening if I have changed the compilation target?
Android creates the manifest with minSdkVersion, that doesn't change automatically when you change the properties.
Change the line inside Android manifest
<uses-sdk android:minSdkVersion="14" />
and put 13 instead of 14.
Open AndroidMainfestFile.xml change the SdkVersion there.
Use as below or remove the entire line for auto detection of API level
<uses-sdk android:minSdkVersion="13"/>
Here is an useful explanation of versioning in Android. Basically android enforces the system compatibility as expressed by the minSdkVersion in the manifest.
android:minSdkVersion — The minimum version of the Android platform on
which the application will run, specified by the platform's API Level
identifier.
One thing to note. Be sure after you have made this change that you "Clean" your project and recompile or it will not take effect.
Make sure that after updating API of your emulator the old version of the emulator should be shutdown if it is running. That was in my case.