編譯失敗铺然,報錯信息如下:
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.
- 解決方法
將原來 room 的依賴方式修改一下抚芦,由 implementation 方式修改為 api 依賴
api 'android.arch.persistence.room:runtime:1.1.1'
- 統(tǒng)一 gradle 版本
可能由于導入的 lib 的 gradle 版本與 app 的gradle 版本不一致導致的屯断,統(tǒng)一版本即可