Android Studio - Gradle Manifest Merging Failed

断了今生、忘了曾经 提交于 2019-12-03 00:36:16
Max Raskin

Make sure that in all your build.gradle scripts the minSdkVersion and targetSdkVersion correspond to those you have in your manifests:

android {
    defaultConfig { 
       minSdkVersion 10
       targetSdkVersion 16
    }
}

This worked for me, I hope it does the trick for you, cheers.

For what I can see, if you have a multi-module project with Android Studio and gradle, the IDE try to merge manifest files from every module into a Main manifest.

If you have a module A and a module B, and in the A manifest you declare some activity from B module, gradle will enconter a issue when merging.

Try removing cross-module reference in manifest files.

user2664843

That worked for me when adding the Google Play Services

android {
    compileSdkVersion 17
    buildToolsVersion "17.0.0"

    defaultConfig {
        minSdkVersion 10
        targetSdkVersion 16
    }
}

That works for me.
My library project AndroidManifest.xml miss a application element
add one will fix it.

<application
    android:allowBackup="true"
    android:label="@string/app_name"
    android:theme="@style/AppTheme" >
</application>

I use gradle clean projectName --info get the error information, and solve it.

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