问题描述
我更新到 gradle 4.0.1 并开始收到以下错误
I updated to gradle 4.0.1 and started receiving following error
库 com.google.android.gms:play-services-measurement-base 是[[15.0.4,15.0.4]] 的各种其他图书馆正在请求,但是解析为 15.0.2.禁用插件并检查您的依赖项使用 ./gradlew :app:dependencies 的树.
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.
我的项目没有使用该依赖项,所以我在全球范围内搜索它,它只出现在内部
My project doesn't use that dependency so I searched globally for it, and it it only comes up inside
build/intermediates/lint-cache/maven.google/com/google/android/gms/group-index.xml
build/intermediates/lint-cache/maven.google/com/google/android/gms/group-index.xml
就像这条线
<play-services-measurement-base versions="15.0.0,15.0.2"/>
所以我尝试删除我的构建文件夹并清理项目,但它使用相同的值重新生成它:/因此错误仍然存在
So I tried deleting my build folder and cleaning the project, but it regenerates it with same values :/ hence error still remains
推荐答案
实际问题在 https://developers.google.com/android/guides/releases#may_23_2018
基本上,您需要将所有 Play 服务 和 Firebase 库升级到其最新版本(自 15 版以来可能会有所不同).您可以使用 https://mvnrepository.com/ 来查找每个库的最新版本.
Basically, you need to bump all Play Services and Firebase libraries to their latest version (which may be different for each since version 15). You may use https://mvnrepository.com/ to find the latest version for each library.
另请参阅:https://firebase.google.com/support/release-notes/android#20180523
这篇关于com.google.android.gms:play-services-measurement-base 正在被其他各种库请求的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!