条目名称 'AndroidManifest.xml' 发生冲突(将 android gradle 插件更新到 3.6.0 后构建失败)

条目名称 'AndroidManifest.xml' 发生冲突(将 android gradle 插件更新到 3.6.0 后构建失败)

问题描述:

我最近将 Android Studio 从 3.5(稳定)更新到了 3.6(稳定).

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

然后我看到插件更新也可用了,所以我更新了com.android.tools.build:gradle"的版本;从 3.5.0 到 3.6.0 并且也将 gradle 版本更新到了 5.6.4.

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.

现在当我尝试构建项目时问题就开始了;它失败并显示消息 Entry name 'AndroidManifest.xml' collided

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

这是Android Gradle plugin 3.6引起的

This is caused by Android Gradle plugin 3.6

通过在 gradle.properties 文件中包含以下内容来恢复使用旧的打包工具将解决此问题

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

android.useNewApkCreator=false

更多信息请查看发行说明:https://developer.android.com/studio/releases/gradle-plugin#zipflinger

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