com.android.build.api.transform.TransformException:java.util.zip.ZipException:重复条目:com / android / volley / Request $ Priority.class

时间:2016-11-08 07:10:37

标签: java android gradle android-gradle build.gradle

我收到此错误

错误:任务':app:transformClassesWithJarMergingForDebug'执行失败。

  

com.android.build.api.transform.TransformException:java.util.zip.ZipException:重复条目:com / android / volley / Request $ Priority.class

这是我的gradle文件

  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 个答案:

答案 0 :(得分:0)

在gradle.build中删除此行时,我解决了这个问题

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

就是这个。