我正试图将一个大项目分成子项目。大多数情况下,它的工作,尽管许多错误相关的依赖处理在等级,但我遇到了一个冲突,我不能得到一个图表来解决。
我期望得到一个依赖关系图,这样我就可以跟踪哪个库有两个冲突的依赖关系,但是在依赖关系图打印出来供我查看之前,命令停止了。
我不确定这是设计的,还是只是gradle或android插件中的另一个bug。
这是我的输出
$ ./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
谁能告诉我我应该如何得到一个依赖关系图,来解决这个问题?
由于启用了配置参数resolutionStrategy.failOnVersionConflict()
,导致错误。
然而,gradle中似乎有一个错误阻止了依赖项任务列出依赖项,因为该参数在执行之前会导致构建失败。