美文网首页
Android unspecified' depends

Android unspecified' depends

作者: xiaobinZh | 来源:发表于2018-03-07 09:32 被阅读178次

引入一个其他模块库作为module的时候遇到下面的报错:

unspecified’ depends on one or more Android Libraries but is a jar

2 原因

引入的模块项目版本不一致,导致的冲突。

比如: android support包的版本不对,自带的是 android-support-v4.jar, 但项目中使用的是support-v13:

compile ‘com.android.support:support-v13:+’

3 解决方法

如果直接使用自带的support-v4,则会和项目中的support-v13发生版本冲突,报下面的错误:

解决方法是 直接 exclude 不需要的 库。

compile ("com.meiyou:live_answer:${LIVE_ANSWER_VERSION}"){

                exclude(group:"com.meiyou", module : "account")

            }

相关文章

网友评论

      本文标题:Android unspecified' depends

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