2017-08-30 89 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'