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

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

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:添加指定解决版本冲突的依赖项版本。

猜你喜欢

转载自www.cnblogs.com/wanqieddy/p/9205399.html