Android dependency ‘android.arch.core:runtime’ has different version for the compile (1.1.0) and run

  • Post author:
  • Post category:其他


今天遇到了一下问题

“`

When converting this project as a library, facing Error:Execution failed for task ‘:app:preDebugBuild’. > Android dependency ‘android.arch.core:runtime’ has different version for the compile (1.0.0) and runtime (1.1.1) classpath. You should manually set the same version via DependencyResolution. #1615

“`

第一种情况:gradle版本问题

gradle 升级 4.4 到4.7就可以了

第二种情况:主工程要用的子module中引用的第三方包

必须设为:

api 'com.tencent.wcdb:room:1.0.8'

而不是

implementation 'com.tencent.wcdb:room:1.0.8'



版权声明:本文为nxstack原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。