android - 重复的zip条目:android/support/v4/media/VolumeProviderCompat $ ControlType

标签 android gradle android-gradle-plugin

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:transformClassesWithMultidexlistForDebug'.
> java.io.IOException: Can't write [/Users/admin/Documents/Tony Project/LOLC/Test/two news feed/HDMI/app/build/intermediates/multi-dex/debug/componentClasses.jar] (Can't read [/Users/admin/Documents/Tony Project/LOLC/Test/two news feed/HDMI/app/build/intermediates/transforms/desugar/debug/9.jar] (Duplicate zip entry [9.jar:android/support/v4/media/VolumeProviderCompat$ControlType.class]))

在module.gradle中我添加了
multiDexEnabled true 然后出现此错误

最佳答案

将此添加到您的local.properties中

org.gradle.jvmargs=-XX\:MaxHeapSize\=512m -Xmx512m

在build.gradle中设置multiDexEnabled = true

关于android - 重复的zip条目:android/support/v4/media/VolumeProviderCompat $ ControlType,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45893517/

相关文章:

java - 添加 Firebase Performance 后无法构建项目 - Android

android - 数据绑定(bind)构建错误,无关输入 '\r' 期望 {COMMENT, SEA_WS, '<' , PI}

android - MotionLayout没有动画

Android startSupportActionMode 在 appcompat 22.0.0 中中断

android - 按钮的随机大小和位置 : unexpected behavior

android - 为什么我的构建在 Android Studio 中失败并出现异常 "Failed to find byte code for android/support/v7/app/ActionBarActivity"?

android - 从Gradle v4到Gradle v5更新-每种JVM语言的单独输出目录

安卓应用程序 : Apply Color Theme Dynamically at Runtime

Android/Sdk/build-tools/22.0.1/aapt'' 以非零退出值 1 完成

docker - 任务 ':buildDB2BotcImage'的执行失败