luckybilly / CC

业界首个支持渐进式组件化改造的Android组件化开源框架,支持跨进程调用。Componentize your android project gradually.
https://luckybilly.github.io/CC-website/
Apache License 2.0
4.04k stars 636 forks source link

android studio3.6.3关于依赖冲突问题 #173

Closed fade0706 closed 4 years ago

fade0706 commented 4 years ago

各个工程都依赖一个了base库,在把android studio 更新到3.6.3后除了主工程外其他工程的类都有红色报错,提示检模块类路径是否缺少依赖或者依赖冲突,但是能正常编译。 78547F20-F466-4827-A385-C93759C7408C

fade0706 commented 4 years ago

这个图片不显示了,报错信息是 android studio cannot access 'androidx.activity.ComponentActivity' Which is a supertype of 'com.xxx.mainactivity'.Check your module classpath for missing or conflicting dependencies

android studio cannot access 'androidx.activity.OnBackPressedDispatcherOwner' Which is a supertype of 'com.xxx.mainactivity'.Check your module classpath for missing or conflicting dependencies

android studio cannot access 'androidx.savedstate.SavedStateRegistryOwner' Which is a supertype of 'com.xxx.mainactivity'.Check your module classpath for missing or conflicting dependencies

fade0706 commented 4 years ago

已解决,根据红色报错信息更新依赖的相关库。

zcwk commented 4 years ago

有些base库不是自己的不能更新呢,有什么办法不提示这个错误吗

fade0706 commented 4 years ago

有些base库不是自己的不能更新呢,有什么办法不提示这个错误吗

gradle玩的不熟,按道理说你的base的库应该是你自己维护修改的。如果是依赖的一些第三方的库依赖的一些其他库,你可以在本地重新依赖一次这些冲突的库,然后在重新依赖的地方去除重复依赖的库。 再或者一个简单的办法是提交本地代码到远程,回滚as版本并且删除本地项目和项目配置,重新拉去远程代码,但这只是把问题往后推移的办法