natur3
natur3

Reputation: 336

How to change the Android Studio Project minSDK version?

I had a recurring error that I wasnt sure how to correct. My android studio was returning the an error indicating that my minSdk version was 11 and had to 14 in order to use the NoTitleBar parent reference in styles.xml. My AndroidManifest had the tag <uses-sdk android:minSdkVersion="14"/> but the error would not go away. I re-cleaned the project and tried to build again - same error.

Android Studio version: 0.8.6 OS: Win8.1

Upvotes: 0

Views: 7302

Answers (2)

freemanpolys
freemanpolys

Reputation: 1998

In app > build.gradle file try to modify this section defaultConfig { minSdkVersion 11 }

Best regards

Upvotes: 2

natur3
natur3

Reputation: 336

Although I had the minSdk set in the manifest the project level sdk was overriding this or at least causing a collision. I located this way: File -> Project Structure -> App -> Flavors -> Change the minSdk version to whatever you need (preferably to match whats in the manifest if its declared - otherwise remove it from there). Hope this helps.

As a note I also next ran into this error I have not resolved yet:

Error:Execution failed for task ':app:processDebugManifest'.
> Manifest merger failed : uses-sdk:minSdkVersion 14 cannot be smaller than version L declared in library com.android.support:support-v4:21.0.0-rc1

Upvotes: 0

Related Questions