Java.util.zip.ZipException: Support for duplicate entries v4 PrintHelper $ 1.class
I'm not sure what this error means.
Error:Execution failed for task': eCampus : packageAllDefaultFlavorDebugClassesForMultiDex'.
> java.util.zip.ZipException: duplicate entry: android/support/v4/print/PrintHelper$1.class
my bulid.gradle:
apply plugin: 'com.android.application'
android {
compileSdkVersion 21
buildToolsVersion '22.0.1'
defaultConfig {
applicationId "tw.edu.chu.ecampus"
minSdkVersion 11
targetSdkVersion 21
multiDexEnabled true
}
buildTypes {
release {
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
}
}
dexOptions {
preDexLibraries = false
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_7
targetCompatibility JavaVersion.VERSION_1_7
}
}
repositories {
mavenCentral()
}
dependencies {
compile project(':G0.10.ABS')//ActionBarSherlock
compile project(':vitamio')
compile 'com.google.android.gms:play-services-maps:7.5.0'
compile 'com.google.android.gms:play-services-gcm:7.5.0'
compile 'com.android.support:multidex:1.0.1'
androidTestCompile 'com.android.support:multidex-instrumentation:1.0.1'
}
The error during gradle sync is not showing. Just when I try to run the application What could be the problem?
+3
source to share
1 answer
I meet the same error and I solve it, but I just give u that my business;
my bulid.gradle:
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
compile ('com.android.support:appcompat-v7:22.0.0')
compile files('libs/android-async-http-1.4.8.jar')
compile files('libs/android-support-v4.jar')
compile files('libs/universal-image-loader-1.9.4-with-sources.jar')
}
the for error - this com.android.support:appcompat-v7:22.0.0
includes support-v4.jar
, so I remove it;
solve build.gradle:
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
compile ('com.android.support:appcompat-v7:22.0.0') {
exclude module: 'support-v4'
}
compile files('libs/android-async-http-1.4.8.jar')
compile files('libs/android-support-v4.jar')
compile files('libs/universal-image-loader-1.9.4-with-sources.jar')
}
so maybe you should check ur dependencies, maybe ur compile files have two files include support-v4
+3
source to share