繁体   English   中英

Java的Unirest-任务':app:transformClassesWithJarMergingForDebug'的执行失败

[英]Unirest with java - Execution failed for task ':app:transformClassesWithJarMergingForDebug'

我尝试在Android Studio的项目中使用unirest。

他们在他们的网站上写道:

不要忘记在类路径中也安装依赖项(org.json,httpclient 4.3.6,httpmime 4.3.6,httpasyncclient 4.0.2)。

我不知道为此添加哪些库。

我尝试添加以下内容:

compile 'org.apache.httpcomponents:httpasyncclient:4.1.1'
compile 'org.apache.httpcomponents:httpmime:4.5.1'
compile 'com.hynnet:httpclient:4.5.1'

我得到这个异常:

Error:Execution failed for task ':app:transformClassesWithJarMergingForDebug'.> 
com.android.build.transform.api.TransformException: java.util.zip.ZipException: duplicate entry: com/google/gson/annotations/Expose.class

有什么帮助吗?

尝试下载依赖项的确切版本。

您可以从这里这里下载

如果问题仍然存在。 告诉我。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM