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 1442
慢半拍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:18

    The answer stated here may not work properly, as it will make your app only work for Android L.

    In order to conserve the backward compatibility with older Android OS versions, change the gradle dependecy

    From:

    compile 'com.android.support:appcompat-v7:+'
    

    To:

    compile 'com.android.support:appcompat-v7:20.+'
    

    Note that the error complains about com.android.support:appcompat-v7:21.0.0-rc1, the reason for that is that using appcompat-v7:+ will tell gradle to import the latest dependency of the appcompat-v7 library, unfortunately this latest version is only working for Android L, so we have to point to a previous version.

    Hopefully Google will fix this in the near future.

提交回复
热议问题