I want to change the minimum SDK version in Android Studio from API 12 to API 14. I have tried changing it in the manifest file, i.e.,
<uses-sdk
android:minSdkVersion="14"
android:targetSdkVersion="18" />
and rebuilding the project, but I still get the Android Studio IDE throwing up some errors. I presume I have to set the min SDK in 'project properties' or something similar so the IDE recognizes the change, but I can't find where this is done in Android Studio.
For android studio users:
The gradle will rebuild the project automatically.
According to this answer, you just don't include minsdkversion in the manifest.xml, and the build system will use the values from the build.gradle file and put the information into the final apk.
Because the build system needs this information anyway, this makes sense. You should not need to define this values two times.
You just have to sync the project after changing the
build.gradle
file, but Android Studio 0.5.2 display a yellow status bar on top of the build.gradle editor window to help youAlso note there at least two
build.gradle
files: one master and one for the app/module. The one to change is in the app/module, it already includes a propertyminSdkVersion
in a newly generated project.