Android依赖冲突。 androidDependencies任务提供的信息

时间:2016-09-15 13:03:13

标签: android gradle-dependencies

我试图将一个大型项目分解为子项目。尽管有许多与级别中的依赖性处理相关的错误,但它的工作大部分仍然存在,但我遇到了冲突,我无法获得图表来解决。

我期望得到一个依赖关系图表,以便我可以追踪哪个库有两个冲突的依赖关系,但命令在打印依赖关系图之前停止供我查看。

我不确定这是以某种方式设计还是gradle或android插件中的另一个错误。

这是我的输出。

$ ./gradlew androidDependencies
Defining custom 'clean' task when using the standard Gradle lifecycle plugins has been deprecated and is scheduled to be removed in Gradle 3.0
Incremental java compilation is an incubating feature.

FAILURE: Build failed with an exception.

* What went wrong:
A problem occurred configuring project ':xlivestream'.
> Could not resolve all dependencies for configuration ':xlivestream:_debugCompile'.
   > A conflict was found between the following modules:
      - com.android.support:support-annotations:23.4.0
      - com.android.support:support-annotations:23.1.1

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

BUILD FAILED

有谁能告诉我我应该如何获得依赖图,以解决这个问题?

1 个答案:

答案 0 :(得分:0)

发生错误是因为配置参数resolutionStrategy.failOnVersionConflict()已启用。

但是,gradle中似乎存在一个错误,它阻止依赖项任务列出依赖项,因为该参数在构建执行之前就失败了。