3
votes

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?

2
Please change the title so that it describes the problem.Peter Niederwieser
i hate your question title.Kosh
ok, but I change title. So what do I do?Artem

2 Answers

3
votes

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'

2
votes

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.