我收到此错误
Error:Execution failed for task ':app:transformClassesWithJarMergingForDebug'.> com.android.build.api.transform.TransformException: java.util.zip.ZipException: duplicate entry: com/android/volley/AuthFailureError.class
我附上 gradle
,请检查并帮助我。
android {
useLibrary 'org.apache.http.legacy'
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
compile files('libs/android-async-http-1.4.4.jar')
compile files('libs/disklrucache-2.0.1.jar')
compile files('libs/google-gson.jar')
compile project(':linkedin-sdk')
compile files('libs/PGSDK_V2.0.jar')
compile 'com.android.support:support-v13:25.3.1'
compile files('libs/okhttp-1.2.1-jar-with-dependencies.jar')
compile files('libs/volley.jar')
compile 'com.android.support:appcompat-v7:25.3.1'
compile 'com.android.support:cardview-v7:25.3.1'
compile 'com.android.support:recyclerview-v7:25.3.1'
compile 'uk.co.chrisjenx:calligraphy:2.2.0'
compile 'com.android.support:design:25.3.1'
compile 'com.android.support:support-v4:25.3.1'
testCompile 'junit:junit:4.12'
compile 'com.razorpay:checkout:1.4.1'
compile 'com.google.android.gms:play-services-auth:9.2.1'
compile 'com.facebook.android:facebook-android-sdk:[4,5)'
compile 'com.jjoe64:graphview:4.2.0'
}
答案 0 :(得分:1)
错误:任务执行失败 ':应用程序:transformClassesWithJarMergingForDebug'> com.android.build.api.transform.TransformException: java.util.zip.ZipException:重复条目: COM /机器人/凌空/ AuthFailureError.class
删除
compile files('libs/volley.jar') // From local lib also
使用强>
compile 'com.android.volley:volley:1.0.0'
我正在使用linkedin sdk,在linkedin adk里面也有一个凌空编译 那里和我的应用程序级别我还有一个凌空依赖。
您应该在那里拨打 volley:1.0.0
。
答案 1 :(得分:0)
从 gradle
compile files('libs/volley.jar')
compile files('libs/google-gson.jar')
并编译以下依赖
compile 'com.google.code.gson:gson:2.8.1'
compile 'com.android.volley:volley:1.0.0'
compile 'com.google.android.gms:play-services-auth:11.4.0'