美文网首页
support-v4包冲突

support-v4包冲突

作者: 图拉汪 | 来源:发表于2018-03-13 16:10 被阅读47次

把V4包放在 子Module 中 时 报错:

Error:FAILURE: Build failed with an exception.

* What went wrong:

Execution failed for task ':app:preDebugBuild'.

> Android dependency 'com.android.support:support-v4' has different version for the compile (21.0.3) and runtime (27.1.0) classpath. You should manually set the same version via DependencyResolution

* Try:

Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

原因:gradle 升级到3.0 以后 使用 implementation 替代compile 导致 

解决方法 : implementation  依赖jar包 对外隐藏  使用api即可(api =  compile 已过时 )

相关文章

网友评论

      本文标题:support-v4包冲突

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