我有一个 Ionic 3 应用程序,当我尝试构建它时出现以下错误:
任务“:app:transformClassesWithMultidexlistForDebug”执行失败。
java.io.IOException:无法写入 [C:\Users\zxy\Desktop\mobile_apps\newone\CourierManager\platforms\android\app\build\intermediates\multi-dex\debug\componentClasses.jar] (不能读取 [C:\Users\zxy\Desktop\mobile_apps\newone\CourierManager\platforms\android\app\build\intermediates\transforms\desugar\debug\8.jar(;;;;;;**.class)] (重复的 zip 条目 [8.jar:ch/qos/logback/core/joran/spi/DefaultClass.class]))
我在 build.gradle
文件中的依赖项如下所示:
dependencies {
implementation fileTree(dir: 'libs', include: '*.jar')
// SUB-PROJECT DEPENDENCIES START
implementation(project(path: ":CordovaLib"))
compile "com.android.support:support-v4:24.1.1+"
compile "me.leolin:ShortcutBadger:1.1.17@aar"
compile "com.google.firebase:firebase-messaging:11.0.1"
compile "com.android.support:support-v4:27.+"
compile "com.squareup.okhttp3:okhttp:3.+"
compile "com.android.support:support-v4:+"
compile "com.google.firebase:firebase-dynamic-links:11.0.1"
compile "com.google.android.gms:play-services-location:11.0.1"
compile "com.android.support:support-v4:26+"
compile "com.android.support:appcompat-v7:26+"
// SUB-PROJECT DEPENDENCIES END
compile 'com.android.support:multidex:1.0.1'
}
有什么方法可以在不删除和添加 Android 平台的情况下解决此问题吗?
最佳答案
发现问题,与build.gradle无关。我有一个旧版本的后台地理定位插件,我已更新。但它似乎保留了一些与新插件冲突的依赖关系。我必须手动从properties.gradle中删除它。
关于java - 无法构建 Android 应用程序 - 重复的 zip 条目,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/58538429/