更新时间:2023-11-20 10:16:34
编译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:重复条目:android/support/v4/view/MotionEventCompatEclair.class
安卓应用:transformClassesWithJarMergingForDebug失败 - 抛出:ZipException:重复的条目
如何解决java.util.zip.ZipException重复的条目:COM /谷歌/ GSON /注解/ Expose.class?
如何解决 java.util.zip.ZipException 重复条目:com/google/gson/annotations/Expose.class?
java.util.zip.ZipException:packageAllDebugClassesForMultiDex 期间的重复条目
java.util.zip.ZipException:重复条目:com / google / zxing / BarcodeFormat.class