美文网首页Android Studio工具使用技巧池
不一样的different version for the co

不一样的different version for the co

作者: 祥龙翔天 | 来源:发表于2018-12-28 16:27 被阅读0次

编译apk时,出现android.arch.lifecycle:runtime依赖错误

Android dependency 'android.arch.lifecycle:runtime' has different version for the compile (1.0.3) and runtime (1.1.1) classpath. You should manually set the same version via DependencyResolution

搜索了一下project的代码,结果如下:

android.arch.lifecycle搜索结果

卧槽,不全是1.1.1吗?1.0.3是怎么出来的啊!!!

没办法,好可怕,那个他,不像话。。。

只有不断的baidu和google了,发现广大网友貌似没有遇到这个情况

幸甚,摸索成果还是有的,果断记录一下解决办法:

其实是自己依赖的module使用了lifecycle相关组件(上图出现的全是依赖module中的),自己的app module却没有依赖相关的库,所以出现了上述问题

用图说话:

模块依赖

如此看来,主module必须要包含所有子模块的依赖才行!

相关文章

网友评论

    本文标题:不一样的different version for the co

    本文链接:https://www.haomeiwen.com/subject/awfelqtx.html