0

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

natur3
  • 236
  • 1
  • 3
  • 14
  • I think you can find your answer here... please try this. http://stackoverflow.com/questions/19465049/changing-api-level-android-studio – Manmohan Soni Mar 25 '15 at 06:09

2 Answers2

2

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

Best regards

freemanpolys
  • 1,350
  • 11
  • 16
  • thanks @freemanpolys this was a 2nd resolution as well after I tried to replicate one last time before calling it resolved. – natur3 Aug 28 '14 at 02:58
0

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
natur3
  • 236
  • 1
  • 3
  • 14
  • 1
    You have to change your support library to avoid that error, support library 21 is for Android L not for API level 14. – Ringo Aug 28 '14 at 01:14
  • After resolving this issue for v4 the same occurred for v7. I went here: File -> Project Structure -> App -> Dependencies and just removed the library reference to v7. In the build.gradle I listed all the version for compile that are in this dropdown here: File -> Project Structure -> App -> Properties -> Compile Sdk Version and Build Tools version. In build.gradle: compile 'com.android.support:support-v4:19.0.0' compile 'com.android.support:support-v4:19.0.1' compile 'com.android.support:support-v4:19.0.2' etc etc – natur3 Aug 28 '14 at 01:57