1
votes

I'm getting this error

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

And this is my gradle file

  apply plugin: 'com.android.application'

 android {
compileSdkVersion 24
buildToolsVersion "24.0.3"
useLibrary 'org.apache.http.legacy'
dexOptions {

    incremental true
    javaMaxHeapSize "4g"
}
defaultConfig {
    applicationId "com.srgsr.gdf.bb"
    minSdkVersion 14
    targetSdkVersion 17
    versionCode 6
    versionName "1.1"
    // Enabling multidex support.
    multiDexEnabled true
    testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}

buildTypes {
    debug {
        debuggable true
    }
    release {
        minifyEnabled false
        proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
    }
}
}

 dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:24.2.1'
compile 'com.android.support:design:24.2.1'
compile 'pl.droidsonroids.gif:android-gif-drawable:1.1.+'
compile 'de.hdodenhof:circleimageview:2.1.0'
compile 'com.facebook.android:facebook-android-sdk:4.2.0'
compile 'com.jaredrummler:material-spinner:1.1.0'
compile 'com.android.support:design:24.2.1'
compile 'com.android.support:cardview-v7:24.2.1'
compile 'com.android.support:recyclerview-v7:24.2.1'
compile 'com.github.halysongoncalves:pugnotification:1.8.1'
compile 'com.google.android.gms:play-services-appindexing:8.1.0'
compile 'com.google.gms:google-services:3.0.0'
compile 'com.google.android.gms:play-services:9.4.0'
compile 'com.android.volley:volley:1.0.0'
compile 'com.android.support:multidex:1.0.1'
compile 'swarajsaaj:otpreader:1.0'
compile files('libs/httpmime-4.1.3.jar')
// Testing dependencies
androidTestCompile 'com.android.support.test.espresso:espresso-core:2.2.2'
androidTestCompile 'com.android.support.test:runner:0.5'
androidTestCompile 'com.android.support:support-annotations:24.2.1'
compile files('libs/urlimageviewhelper-1.0.4.jar')

}

1
Have you checked gradle app:dependencies? It looks like some library is adding a volley as well. If you find such library, you need to exclude it. - jakubbialkowski
comment 'compile 'com.android.volley:volley:1.0.0'' then try - Kamran Ahmed Khan
you are also using 'urlimageviewhelper-1.0.4.jar' (depricated library) use ion instead: github.com/koush/ion - Kamran Ahmed Khan

1 Answers

0
votes

i solved this problem when remove this line in gradle.build

compile 'com.android.volley:volley:1.0.0'

just this.