gpt4 book ai didi

java - 警告 :Dependency org. apache.httpcomponents :httpclient:4. 0.1 被忽略

转载 作者:搜寻专家 更新时间:2023-11-01 07:50:00 26 4
gpt4 key购买 nike

当我尝试将我的 libs2 文件夹中的任何 .jar 文件添加到我的 libs 文件夹时 enter image description here

我收到以下错误:

    Information:Gradle tasks [:app:assembleDebug]
Warning:Dependency org.apache.httpcomponents:httpclient:4.0.1 is ignored for debug as it may be conflicting with the internal version provided by Android.
In case of problem, please repackage it with jarjar to change the class packages
Warning:Dependency org.apache.httpcomponents:httpclient:4.0.1 is ignored for release as it may be conflicting with the internal version provided by Android.
In case of problem, please repackage it with jarjar to change the class packages
:app:preBuild UP-TO-DATE
.....
:app:compileDebugNdk UP-TO-DATE
:app:compileDebugSources
:app:transformClassesWithDexForDebug
UNEXPECTED TOP-LEVEL EXCEPTION:
Error:Execution failed for task ':app:transformClassesWithDexForDebug'.
> com.android.build.api.transform.TransformException: com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command 'C:\Program Files\Java\jdk1.8.0_45\bin\java.exe'' finished with non-zero exit value 2

我知道 libs2 中的文件会导致错误,因为我会一个一个地添加它们并查看哪些会导致问题,基于这个人 suggestion .

我正在关注 tutorial这需要所有这些 .jar 文件,所以我不明白为什么我会收到这些错误,因为它们是必需的。

最佳答案

使用 Gradle 无需降级或寻找另一个 jar - 因为可以按组/模块过滤:

compile ('com.google.http-client:google-http-client-jackson2:1.21.0') {
exclude group: 'org.apache.httpcomponents', module: 'httpclient'
}

关于java - 警告 :Dependency org. apache.httpcomponents :httpclient:4. 0.1 被忽略,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36169919/

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