我更新到 gradle 4.0.1 并开始收到以下错误
The library com.google.android.gms:play-services-measurement-base is being requested by various other libraries at [[15.0.4,15.0.4]], but resolves to 15.0.2. Disable the plugin and check your dependencies tree using ./gradlew :app:dependencies.
我的项目没有使用该依赖项,所以我在全局范围内搜索它,它只出现在内部
build/intermediates/lint-cache/maven.google/com/google/android/gms/group-index.xml
就像这条线
<play-services-measurement-base versions="15.0.0,15.0.2"/>
所以我尝试删除我的构建文件夹并清理项目,但它使用相同的值重新生成它:/因此错误仍然存在
最佳答案
实际问题在 https://developers.google.com/android/guides/releases#may_23_2018 的 5 月 23 日发行说明中进行了讨论
基本上,您需要将所有 Play 服务 和 Firebase 库升级到其最新版本(自 15 版以来可能会有所不同 )。 您可以使用 https://mvnrepository.com/找到每个库的最新版本。
另请参阅:https://firebase.google.com/support/release-notes/android#20180523
关于android - com.google.android.gms :play-services-measurement-base is being requested by various other libraries,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50577437/