【发布时间】:2016-01-05 07:15:09
【问题描述】:
在 android studio 中运行我的应用程序时,出现以下错误:
Error:Execution failed for task ':app:transformClassesWithJarMergingForDebug'.
com.android.build.transform.api.TransformException:java.util.zip.ZipException:重复条目:android/support/v7/view/ActionMode$Callback.class
这里是 sdk 版本和构建工具
compileSdkVersion 21
buildToolsVersion "21.1.2"
这是我的 gradle 依赖项:
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
compile 'com.google.android.gms:play-services-gcm:8.1.0'
compile 'com.google.android.gms:play-services-location:8.1.0'
compile 'com.android.support:appcompat-v7:22.2.1'
compile 'com.android.support:cardview-v7:22.2.1'
compile 'com.android.support:recyclerview-v7:22.2.1'
compile 'com.android.support:support-v13:22.2.1'
compile files('libs/gson-2.3.1.jar')
compile project(':Cropper')
compile project(':volley')
compile files('libs/httpclient-4.5.1.jar')
compile files('libs/httpcore-4.3.1.jar')
compile files('libs/httpmime-4.3.1.jar')
compile files('libs/ormlite-android-4.43.jar')
compile files('libs/ormlite-core-4.43.jar')
compile files('libs/acra-4.6.1.jar')
compile 'com.android.support:design:22.2.1'
}
此外,我正在使用 volley api 和一个cropper 库。两个库都没有任何依赖关系。我不知道我在哪里使用重复库。
在升级设计库(支持:设计)之前,我使用了以下依赖项:
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
compile 'com.google.android.gms:play-services-gcm:8.1.0'
compile 'com.google.android.gms:play-services-location:8.1.0'
compile 'com.android.support:appcompat-v7:22.0.0'
compile 'com.android.support:cardview-v7:22.0.0'
compile 'com.android.support:recyclerview-v7:22.2.0'
compile 'com.android.support:support-v13:22.0.0'
compile files('libs/gson-2.3.1.jar')
compile project(':Cropper')
compile project(':volley')
compile files('libs/httpclient-4.5.1.jar')
compile files('libs/httpcore-4.3.1.jar')
compile files('libs/httpmime-4.3.1.jar')
compile files('libs/ormlite-android-4.43.jar')
compile files('libs/ormlite-core-4.43.jar')
compile files('libs/acra-4.6.1.jar')
compile 'com.android.support:design:22.2.0'
}
它工作正常,但在进行更改后,这些依赖项开始抛出相同的错误。我无法理解这个问题。
由于我完全卡在这里,请帮助解决这个问题。
提前致谢!!
【问题讨论】:
-
duplicate entry。注释每个 .and 调试 .same 类型会导致这种情况 -
@IntelliJAmiya 是的错误就像但没有重复的依赖关系.. 解决方案是什么??
标签: android android-gradle-plugin android-support-library android-support-design android-multidex