Skip to content
This repository has been archived by the owner on Feb 26, 2018. It is now read-only.

Duplicate entry: com/android/volley/Request$Priority.class #164

Open
ThathaPavanNagaraju opened this issue Sep 30, 2016 · 3 comments
Open

Comments

@ThathaPavanNagaraju
Copy link

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.

@habeebrahmanpt
Copy link

habeebrahmanpt commented Feb 24, 2017

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

@heartandsoul
Copy link

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'

}

@ThathaPavanNagaraju
Copy link
Author

ThathaPavanNagaraju commented Jun 6, 2017

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.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants