Manifest merger failed : uses-sdk:minSdkVersion 9 cannot be smaller than version L declared in library com.android.support

10,695

Solution 1

Android L Preview build cannot target previous Android version. I think com.android.support:support-v4:21.0.0-rc1 is built for Android L Preview only, try to change the version to 20+ pending v21 release

EDIT :

It's possible that Google Play Services includes android-support-v4:21.0.0-rc1 . Avoid using + in gradle dependencies (i use it only for minor versions), last version of Google Play Services is 5.2.08 from Android L Preview, try to replace compile 'com.google.android.gms:play-services:+' with compile 'com.google.android.gms:play-services:5.0.89'

Solution 2

If you're getting these problems nowadays (now that Lollipop is available), then it may mean that you're using an old version of the support library. As noted in the known issues on the Android Tools site:

If your build fails with an error message like this:

:app:processDebugManifest app/src/main/AndroidManifest.xml:0:0 Error: uses-sdk:minSdkVersion 19 cannot be smaller than version L declared in library app/build/intermediates/exploded-aar/com.android.support/appcompat-v7/21.0.0-rc1/AndroidManifest.xml
Suggestion: use tools:overrideLibrary="android.support.v7.appcompat" to force usage

you are using an obsolete version of the Android support libraries. Open up the SDK manager and update to the latest (non-preview) versions.

Share:
10,695
Artem
Author by

Artem

Android and Flutter dev

Updated on June 28, 2022

Comments

  • Artem
    Artem almost 2 years

    I have a problem - I imported the project in Android Studio. When I run the project I get the following error:

    Error:Execution failed for task ':driverNotes:processDebugManifest'.

    Manifest merger failed : uses-sdk:minSdkVersion 9 cannot be smaller than version L declared in library com.android.support:support-v4:21.0.0-rc1

    android {
    compileSdkVersion 19
    buildToolsVersion '19.1.0'
    defaultConfig {
        minSdkVersion 9
        targetSdkVersion 19
    }
    

    Dependencies in build.gradle:

    dependencies {
        compile project(':facebookSDK')
        compile project(':vKOpenAuthActivity')
        compile project(':easyFousquareActivity')
        compile project(':pullToRefresh')
        compile project(':volley') 
        compile 'com.android.support:appcompat-v7:20.+'
        compile 'com.android.support:support-v4:20.+'
        compile 'com.google.android.gms:play-services:+'   
        compile files('libs/commons-codec-1.9.jar')
        compile files('libs/signpost-commonshttp-1.2.1.1.jar')
        compile files('libs/signpost-core-1.2.1.2.jar')
        compile files('libs/twitter4j-core-4.0.1.jar')
        compile files('libs/nineoldandroids-2.4.0.jar')
        compile files('libs/gson-2.2.4.jar')
        compile files('libs/httpclientandroidlib-1.2.0.jar')
    
    }
    

    I used java 7. How can I get rid of this error message?

  • Artem
    Artem over 9 years
    I'm a little not understand how to do it?
  • alvinmeimoun
    alvinmeimoun over 9 years
    Edited answer, i think it's caused by play-services
  • alvinmeimoun
    alvinmeimoun over 9 years
    Check all linked projects and set the same version of android-support-v4 on each project
  • Artem
    Artem over 9 years
    thnks, I set 'com.android.support:support-v4:20.+' in facebook SDK and this help me! Thank you very much!!!!!