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

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

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

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

5、在Terminal中搜索annotations模块

6、在app模块下的build.gradle中,删除多余的模块
implementation('com.qianwen:okhttp-utils:3.8.0', { exclude module: 'kotlin-stdlib-jre7'})

到此解决冲突,祝你好运。
网友评论