How to Solve 'Manifest merger failed' erro

2019-07-18 12:43发布

Error from androidmanifest.xml :

Execution failed for task ':app:processDebugManifest' Manifest merger failed : uses-sdk:minSdkVersion 1 cannot be smaller than version 7 declared in library [com.android.support:appcompat-v7:23.2.0] C:\Users\bsuni\AndroidStudioProjects\Rec\app\build\intermediates\exploded-aar\com.android.support\appcompat-v7\23.2.0\AndroidManifest.xml Suggestion: use tools:overrideLibrary="android.support.v7.appcompat" to force usage

2条回答
甜甜的少女心
2楼-- · 2019-07-18 13:18

I have regenerate this error :

You have selected minSdkVersion to 1 while you created project.

as well as you are using :

compile 'com.android.support:appcompat-v7:23.2.0'
compile 'com.android.support:design:23.2.0'

due to this error occurs.

suggestion by android-studio :

use android.support.v7.appcompat

solution : change in gradle

minSdkVersion 7
查看更多
啃猪蹄的小仙女
3楼-- · 2019-07-18 13:29
    configurations.all {
    resolutionStrategy.eachDependency { DependencyResolveDetails details ->
    def requested = details.requested
    if (requested.group == 'com.android.support') {
        if (!requested.name.startsWith("multidex")) {
            details.useVersion '26.0.2'
        }
    }
} 

}

NOTE :Add this to your build.gradle and make sure you are using the same versions as '26.0.2'.

查看更多
登录 后发表回答