1

我尝试在我的 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

有什么帮助吗?

4

1 回答 1

0

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

你可以从这里这里下载

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

于 2016-03-10T19:53:58.520 回答