2017-08-30 92 views
-1

我在返回JSON請求時出錯,我的程序沒有編譯出現此錯誤。JSON對象請求時出錯

Error:Execution failed for task ':app:transformClassesWithJarMergingForDebug'. 
> com.android.build.api.transform.TransformException: java.util.zip.ZipException: duplicate entry: com/android/volley/AuthFailureError.class 
+1

顯示'build.gradle' –

+0

這裏是我的[Build.gradlel(https://gist.github.com/anonymous/6c682419327e9a32d05eb0b38bd680b3) –

回答

0

complie這

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

在你的應用程序目錄內build.gradle file

android{ 
configurations { 
    all*.exclude group: 'com.android.volley' 
    all*.exclude module: 'toolbox' 
}} 
+0

它不工作 –

+0

支票更新ans –

+2

ThankYou Man it it –

0

com.android.build.api.transform.TransformException補充一點: 的java.util .zip.ZipException:重複條目: com/android/volley/AuthFailureError.class

如果您在使用

compile 'com.mcxiaoke.volley:library:1.0.19' 

你應該在你的build.gradle部分添加此。

configurations{ 
    all*.exclude module: 'toolbox' 
} 

FYI

mcxiaoke.volley:library:1.0.19Deprecated。不要使用。

您應該使用Volley

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