How to Solve 'Manifest merger failed' error in android-studio?

为君一笑 提交于 2019-12-11 00:15:18

问题


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


回答1:


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



回答2:


    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'.



来源:https://stackoverflow.com/questions/35763700/how-to-solve-manifest-merger-failed-error-in-android-studio

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!