android-volley
android-volley copied to clipboard
Duplicate entry: com/android/volley/Request$Priority.class
FAILURE: Build failed with an exception.
-
What went wrong: Execution failed for task ':app:transformClassesWithJarMergingForDebug'.
com.android.build.api.transform.TransformException: java.util.zip.ZipException: duplicate entry: com/android/volley/Request$Priority.class
-
Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
i getting same issue Error:Execution failed for task ':app:transformClassesWithJarMergingForDebug'.
com.android.build.api.transform.TransformException: java.util.zip.ZipException: duplicate entry: com/android/volley/Request$Priority.class
can you please check my gardle file? i have the same problem What went wrong: Execution failed for task ':app:transformClassesWithJarMergingForRelease'.
com.android.build.api.transform.TransformException: java.util.zip.ZipException: duplicate entry: com/android/volley/Request$Priority.class
My gardle file:
apply plugin: 'com.android.application'
android { compileSdkVersion 23 buildToolsVersion '25.0.0'
defaultConfig {
applicationId "com.heartandsoulcafe.heartandsoul"
minSdkVersion 19
targetSdkVersion 23
versionCode 1
versionName "1.0"
multiDexEnabled true
}
configurations {
all*.exclude group: 'com.android.volley', module: 'volley:volley'
all*.exclude group: 'com.mcxiaoke.volley', module: 'volley:library-aar'
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
sourceSets { main { assets.srcDirs = ['src/main/assets', 'src/main/assets/2'] } }
}
dependencies { compile project(':picasso-2.5.2') compile project(':GenAsync') compile fileTree(dir: 'libs', include: ['*.jar']) compile 'com.android.support:appcompat-v7:23.4.0' compile 'com.android.volley:volley:1.0.0' compile 'com.mcxiaoke.volley:library-aar:1.0.1' compile 'com.android.support:design:23.4.0' compile 'com.android.support:support-v4:23.4.0' compile 'com.google.android.gms:play-services-appindexing:9.6.1' compile 'com.google.android.gms:play-services:9.6.1' compile 'com.android.support.constraint:constraint-layout:1.0.0-alpha9' compile 'com.android.support:multidex:1.0.1'
testCompile 'junit:junit:4.12'
}
This issue occurs basically if there are duplicate libraries in two or more dependencies,
compile project(':picasso-2.5.2'){ transitive = true; } compile project(':GenAsync'){ transitive = true; } if this doesn't work see which of these above two dependencies uses volley and try to exclude that volley library during building gradle.