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

后端 未结 6 1439
慢半拍i
慢半拍i 2020-12-04 18:11

Got the above error after downloading L preview release version in Android Studio, when my project had minSdkVersion 19.

Furthermore, when

6条回答
  •  天涯浪人
    2020-12-04 18:11

    Just in addition: The other answers here did not fix the problem for me, but I found an alternate way to fix the android-l problem on Android Studio 0.8.0. After I did change the dependencies in the build.gradle, the problem sadly kept occuring, that the code would say OLD_SKD. I'm using a Galaxy S2.

    Apart from changing all things to :19+:

    dependencies {
        compile fileTree(dir: 'libs', include: ['*.jar'])
        compile 'com.android.support:appcompat-v7:19+'
        compile 'com.android.support:support-v4:19+'
        compile 'com.google.android.gms:play-services:+'
        compile 'com.android.support:mediarouter-v7:19+'
    }
    

    It still would not work, so I had to move back everywhere possible:

    android {
        compileSdkVersion 19
        buildToolsVersion '19.1'
        defaultConfig {
            minSdkVersion 11
            targetSdkVersion 19
            versionCode 1
            versionName '1.0'
        }
    

    Now the app works again on the phone. I should probably get a new mobile, but for now, I hope this may help someone.

提交回复
热议问题