Warning:Dependency org.apache.httpcomponents:httpclient:4.2.1 在使用 jfrog 和 android-maven-plugin 时被忽略

Warning:Dependency org.apache.httpcomponents:httpclient:4.2.1 is ignored when using jfrog and android-maven-plugin

我在使用 JFrog 插件创建外部 android 库时遇到了很多问题。本质上,它一直在尝试从 apache 获取依赖项,而无需我询问它们。它似乎与我使用 gradle 应用的插件有关。如果我尝试在我的应用程序中使用这个库并尝试使用本地 Maven 存储库 运行 它,它会持续很长时间然后我会收到这些警告:

Information:Gradle tasks [clean, :generateDebugSources, >:generateDebugAndroidTestSources, :compileDebugSources, >:compileDebugAndroidTestSources]

Warning:Dependency org.apache.httpcomponents:httpclient:4.2.1 is ignored >for debug as it may be conflicting with the internal version provided by >Android.

最后我得到错误:

com.android.dx.cf.cst.ConstantPoolParser.parse0(ConstantPoolParser.java:262)
        at com.android.dx.cf.cst.ConstantPoolParser.parse0(ConstantPoolParser.java:294)
        at com.android.dx.cf.cst.ConstantPoolParser.parse(ConstantPoolParser.java:150)
        at com.android.dx.cf.cst.ConstantPoolParser.parseIfNecessary(ConstantPoolParser.java:124)
        at com.android.dx.cf.cst.ConstantPoolParser.getPool(ConstantPoolParser.java:115)
        at com.android.dx.cf.direct.DirectClassFile.parse0(DirectClassFile.java:482)
        at com.android.dx.cf.direct.DirectClassFile.parse(DirectClassFile.java:406)
        at com.android.dx.cf.direct.DirectClassFile.parseToInterfacesIfNecessary(DirectClassFile.java:388)
        at com.android.dx.cf.direct.DirectClassFile.getMagic(DirectClassFile.java:251)
        at com.android.dx.command.dexer.Main.parseClass(Main.java:764)
        at com.android.dx.command.dexer.Main.access00(Main.java:85)
        at com.android.dx.command.dexer.Main$ClassParserTask.call(Main.java:1684)
        at com.android.dx.command.dexer.Main.processClass(Main.java:749)
        ... 12 more
    Error:java.lang.IllegalArgumentException: bad utf-8 byte a0 at offset 00000004
        at com.android.dx.rop.cst.CstString.throwBadUtf8(CstString.java:171)
        at com.android.dx.rop.cst.CstString.utf8BytesToString(CstString.java:143)
        at com.android.dx.rop.cst.CstString.<init>(CstString.java:200)
        at com.android.dx.cf.cst.ConstantPoolParser.parseUtf8(ConstantPoolParser.java:371)
        ... 25 more
    1 error; aborting
    Error:Execution failed for task ':app:transformClassesWithDexForDebug'.
    > com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command '/Library/Java/JavaVirtualMachines/jdk1.8.0_65.jdk/Contents/Home/bin/java'' finished with non-zero exit value 1

<!-- end snippet -->

而且我已经通过 Whosebug 和其他网站进行了搜索,但找不到答案。 Incomprehensible error starting the project (gradle) doesn't work for me. My gradle file you can see here: https://raw.githubusercontent.com/jesperancinha/lib-chartizate-sz/master/chartizate-text-writer-android/build.gradle 中提供的解决方案。我已经看到 JFrog 和 android-maven gradle 插件似乎是罪魁祸首,因为只有当我添加它们时我才开始遇到问题。

检查,我刚刚弄清楚问题是什么,现在我想知道 Incomprehensible error starting the project (gradle) 的问题是否相同。本质上,我的类路径中有 maven 插件、jfrog 插件以及 gradle 插件,这实际上是在进行大量递归调用,并使这些插件成为实际构建的一部分。现在已修复,我将关闭此问题。