Can you change min. API level for your Android app in Eclipse?

AndroidEclipseApi

Android Problem Overview


I selected API minimum level 1.5 for my android app and I'm just about to integrate gestures in to it which came in 1.6. Is there a way in Eclipse to change the minimum level from 1.5 to 1.6 halfway through building an app?

Many thanks

Android Solutions


Solution 1 - Android

If you go into your Manifest file and set

    <uses-sdk android:minSdkVersion="3" />

to

    <uses-sdk android:minSdkVersion="4" />

Then you will have changed your entire project from running 1.5 as a minimum to 1.6.

While you are still building your app, you can change the minimum API level at any time.

Solution 2 - Android

Using Android Studio, you would find minSdkVersion in the build.gradle file under app directory.

Solution 3 - Android

The answers regarding uses-sdk are no longer true in Intellij.

Now <uses-sdk> is ignored in the AndroidManifest.xml, it is automatically added to the built manifest file. To change the version, go to the 'build.gradle' file and look at the minSdkVersion.

Solution 4 - Android

Yes, go to your manifest and change <uses-sdk android:minSdkVersion="3" /> to <uses-sdk android:minSdkVersion="4" />. Then go to Project > Properties > Android and change the Project Build Target to 1.6 to recognize new API code introduced in 1.6.

Solution 5 - Android

Change the following line in your AndroidManifest.xml file

    <uses-sdk android:minSdkVersion="8" />

Just think of minSdkVersion as your targeted API number.

Keep in mind that this could cause some older devices not run your application.

Solution 6 - Android

In Intellij version of Android Studio, you can just go to Gradle Scripts>build.gradle(Module:app) then changing this line

> minSdkVersion 12

to the number of version you desire.

Solution 7 - Android

In Android Studio you will find the minSdkVersion/targetSdkVersion in the build.gradle (module:app)file under the Gradle Scripts Directory. Edit the build version here and then open the Manifest file to Synch the changes made.

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionDariusView Question on Stackoverflow
Solution 1 - AndroidAuroraView Answer on Stackoverflow
Solution 2 - Androiduser3366032View Answer on Stackoverflow
Solution 3 - AndroidDavid Ljung Madison StellarView Answer on Stackoverflow
Solution 4 - AndroidAndy ZhangView Answer on Stackoverflow
Solution 5 - AndroidBalibreraView Answer on Stackoverflow
Solution 6 - AndroidAmmar AndikoView Answer on Stackoverflow
Solution 7 - AndroidVontonnie FanadezView Answer on Stackoverflow