gpt4 book ai didi

android - 错误 :Execution failed for task ':app:transformClassesWithJarMergingForDebug' in android + volley libraries

转载 作者:行者123 更新时间:2023-12-02 10:54:03 25 4
gpt4 key购买 nike

我已阅读文章 this in backendlessthisthis在 StackOverflow 中。但是对我没有任何帮助。我到处搜索,但没有任何解决方案。错误如下

Error:Execution failed for task ':app:transformClassesWithDexForDebug'.

com.android.build.api.transform.TransformException: com.android.ide.common.process.ProcessException: java.util.concurrent.ExecutionException: com.android.dex.DexException: Multiple dex files define Lcom/android/volley/VolleyError;



在 build.gradle
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 'com.android.support:appcompat-v7:25.3.1'
compile 'com.android.support.constraint:constraint-layout:1.0.2'
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:25.3.1'
androidTestCompile 'com.mcxiaoke.volley:library:1.0.18'
compile project(":volley")
compile 'com.mcxiaoke.volley:library:1.0.18'

}

删除 compile 'com.mcxiaoke.volley:library:1.0.18' 时此错误将消失在 build.gradle 中。

我需要做的是在应用程序和服务器(本地主机)中传递数据。要传递我使用 JSON 的字符串。在安卓应用中使用 Volley图书馆。

我会错过什么?谢谢

最佳答案

I'm searching everywhere but there aren't any references



The documentation表明 Google 的官方 Volley 工件可通过以下方式获得:
compile 'com.android.volley:volley:1.0.0'

使用它而不是 com.mcxiaoke.volley:library:1.0.18 , which was published two years ago .

现在,您还有 compile project(":volley") .我不知道为什么。使用 com.android.volley:volley:1.0.0compile project(":volley") , 不是都。除非你有使用库模块的特定原因(例如,你正在 fork Volley),否则我建议使用 com.android.volley:volley:1.0.0神器。

关于android - 错误 :Execution failed for task ':app:transformClassesWithJarMergingForDebug' in android + volley libraries,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44763445/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com