Android unspecified' depends

2018-03-07  本文已影响178人  xiaobinZh

引入一个其他模块库作为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")

            }

上一篇 下一篇

猜你喜欢

热点阅读