错误:java.util.zip.ZipException:重复的条目 [英] Error: java.util.zip.ZipException: duplicate entry
本文介绍了错误:java.util.zip.ZipException:重复的条目的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我试图将库添加到我的项目,现在我的电流的build.gradle
是:
应用插件:'com.android.application安卓{
compileSdkVersion 21
buildToolsVersion21.1.2 库{
mavenCentral()
} defaultConfig {
的applicationIDcom.example.guycohen.cheaters
11的minSdkVersion
targetSdkVersion 21
版本code 1
的versionName1.0
//启用multidex支持。
multiDexEnabled真
}
buildTypes {
发布 {
minifyEnabled假
proguardFiles getDefaultProguardFile('proguard的-android.txt'),'proguard-rules.pro
}
}
}依赖{
编译文件树(导演:'库',包括:['的* .jar'])
编译com.android.support:appcompat-v7:21.0.3
编译com.facebook.android:facebook-android-sdk:4.0.0
编译com.android.support:multidex:1.0.0
编译com.parse.bolts:螺栓-机器人:1 +'
编译com.squareup.picasso:毕加索:2.5.2
编译com.whl.handytabbar:库:1.0.4
编译com.nineoldandroids:库:2.4.0
编译com.daimajia.easing:库:1.0.1@aar
编译com.daimajia.androidanimations:库:1.1.3@aar
}
当我添加一个新的库
编译com.github.navasmdc:PhoneTutorial:1 + @ AAR
我得到这个错误:
错误:执行失败的任务:应用程序:packageAllDebugClassesForMultiDex。
> java.util.zip.ZipException:重复的条目:安卓/支持/ V4 /打印/ PrintHelperKitkat $ 2 $ 1.class
我试图通过增加来解决这个问题。
配置{所有* .exclude组:com.android.support',模块:支持-V4'}
我不能在我的项目找到一个重复类。
我敢肯定,无论我是否可以删除重复的条目,将完美运行,但我不知道我怎么会找到它。
解决方案
编译com.android.support:support-v4:22.1.1
编译('com.android.support:appcompat-v7:22.1.1'){
排除模块:支持-V4
}
编译('com.facebook.android:facebook-android-sdk:4.2.0'){
排除模块:支持-V4
}
编译('com.github.navasmdc:PhoneTutorial:1 + @ AAR'){
排除模块:支持-V4
}
I'm trying to add a library to my project, right now my current build.gradle
is:
apply plugin: 'com.android.application'
android {
compileSdkVersion 21
buildToolsVersion "21.1.2"
repositories {
mavenCentral()
}
defaultConfig {
applicationId "com.example.guycohen.cheaters"
minSdkVersion 11
targetSdkVersion 21
versionCode 1
versionName "1.0"
// Enabling multidex support.
multiDexEnabled true
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:appcompat-v7:21.0.3'
compile 'com.facebook.android:facebook-android-sdk:4.0.0'
compile 'com.android.support:multidex:1.0.0'
compile 'com.parse.bolts:bolts-android:1.+'
compile 'com.squareup.picasso:picasso:2.5.2'
compile 'com.whl.handytabbar:library:1.0.4'
compile 'com.nineoldandroids:library:2.4.0'
compile 'com.daimajia.easing:library:1.0.1@aar'
compile 'com.daimajia.androidanimations:library:1.1.3@aar'
}
When I add a new library
compile 'com.github.navasmdc:PhoneTutorial:1.+@aar'
I get this error:
Error:Execution failed for task ':app:packageAllDebugClassesForMultiDex'.
> java.util.zip.ZipException: duplicate entry: android/support/v4/print/PrintHelperKitkat$2$1.class
I've tried to fix this issue by adding
configurations { all*.exclude group: 'com.android.support', module: 'support-v4' }
I couldn't find a duplicate class in my project.
I'm sure whether if I could delete the duplicate entry it would run perfectly, but I'm not sure how I'd find it.
解决方案
compile 'com.android.support:support-v4:22.1.1'
compile ('com.android.support:appcompat-v7:22.1.1') {
exclude module: 'support-v4'
}
compile ('com.facebook.android:facebook-android-sdk:4.2.0') {
exclude module: 'support-v4'
}
compile ('com.github.navasmdc:PhoneTutorial:1.+@aar') {
exclude module: 'support-v4'
}
这篇关于错误:java.util.zip.ZipException:重复的条目的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文