AndroidStudio解决依赖包冲突

2019-05-19  本文已影响0人  海云志

1、点击Run with --stacktrace 查看包冲突详细信息

图1

2、运行Run with --stacktrace后看到冲突得类是JdkConstants$TabLayoutPolicy

图2

3、全局搜索JdkConstants$TabLayoutPolicy,发现有两个包引用了

图3

4、在Terminal中运行gradlew :app:dependencies

图4

5、在Terminal中搜索annotations模块

图5

6、在app模块下的build.gradle中,删除多余的模块

implementation('com.qianwen:okhttp-utils:3.8.0', { exclude module: 'kotlin-stdlib-jre7'})

图6

到此解决冲突,祝你好运。

上一篇 下一篇

猜你喜欢

热点阅读