Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Entry name 'AndroidManifest.xml' collided (Build failed after updating the android gradle plugin to 3.6.0)

I have recently updated the Android Studio from 3.5(stable) to 3.6(stable).

Then I saw the plugin update was also available, so I have updated the version of "com.android.tools.build:gradle" from 3.5.0 to 3.6.0 and also updated the gradle version to 5.6.4.

Now the problem starts when I try to build the project; it fails with message Entry name 'AndroidManifest.xml' collided

enter image description here

like image 325
Rikin Prajapati Avatar asked Sep 01 '25 22:09

Rikin Prajapati


2 Answers

This is caused by Android Gradle plugin 3.6

Revert to using the old packaging tool by including the following in your gradle.properties file will fix this issue

android.useNewApkCreator=false

More info please check the release note: https://developer.android.com/studio/releases/gradle-plugin#zipflinger

like image 151
xfx Avatar answered Sep 03 '25 16:09

xfx


I found a workaround by adding this to the app's build.gradle:

android {
    packagingOptions {
        exclude 'AndroidManifest.xml'
    }
}

I had this to fix an issue with creating a bundle, due to Facebook's Audience Network, on Android Studio 3.5.

like image 26
Marco Batista Avatar answered Sep 03 '25 14:09

Marco Batista