今天遇到了一下问题
```
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'
本文详细介绍了在Android项目中遇到的依赖版本冲突问题,包括两种常见情况:一是Gradle版本问题,通过升级Gradle版本可以解决;二是主工程中子模块引用的第三方包版本不一致,需要统一设置相同的版本。

3196

被折叠的 条评论
为什么被折叠?



