解决编译时依赖版本冲突问题

 

当编译出现如下问题(版本不兼容):

Android dependency 'com.android.support:support-fragment' has different version for the compile (25.3.1) and runtime (26.1.0) classpath. You should manually set the same version via DependencyResolution

如何解决 :

./gradlew app:dependencies > log_dependencies.txt

提取依赖的信息。

 

打开  log_dependencies.txt文件,查找26.1.0关键字。

当前使用的implementation 'com.android.support:appcompat-v7:25.3.1'

发现:account模块中,所依赖模块mvp的 25.3.1与26.1.0冲突。

 

解决方案:

1:mvp模块中去掉所依赖的冲突项。

2:添加指定解决版本冲突的依赖项版本。

 

posted @ 2018-06-20 18:35  wanqi  阅读(3293)  评论(0编辑  收藏  举报