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

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


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.


I get a similar error: Entry name 'resources.arsc' collided. Workaround as @Marco Batista said:

android {
    packagingOptions {
        exclude 'resources.arsc'
    }
}