Failed to merge manifest: uses-sdk: minSdkVersion 9 cannot be less than the L version declared in the com.android.support library

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

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

Failed to execute merge manifest: uses-sdk: minSdkVersion 9 cannot be less than L version declared in com.android.support:support-v4:21.0.0-rc1 library

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

      

Dependencies in build.gradle file:

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 have used java 7. How can I get rid of this error message?

+3


source to share


2 answers


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

EDIT:



Maybe Google Play Services supports android-support-v4: 21.0.0-rc1. Avoid using + dependencies in gradle (I only use it for minor versions), the latest version of Google Play Services is 5.2.08 from Android L Preview, try replacing compile 'com.google.android.gms:play-services:+'

withcompile 'com.google.android.gms:play-services:5.0.89'

+3


source


If you are currently getting these problems (now that Lollipop is available), it could mean that you are using an older 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 less than the L version declared in the app / build / intermediates / exploded-aar / com.android.support library /appcompat-v7/21.0.0-rc1/AndroidManifest.xml
Suggestion: use tools: overrideLibrary = "android.support.v7.appcompat" to force use

you are using an outdated version of the android support libraries. Open SDK manager and update to the latest versions (no preview).

+2


source







All Articles