Gradle同步失败-播放服务测量基础 [英] Gradle sync fails - play-services-measurement-base

查看:83
本文介绍了Gradle同步失败-播放服务测量基础的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的Android项目有问题,我无法构建,这是我的错误:

I have a problem on my Android project, I can't build, this is the error I have:

无法通知依赖项解析侦听器. 各种其他库都在[[15.0.2,15.0.2],[15.0.4,15.0.4]]请求com.google.android.gms:play-services-measurement-base库,但解析为15.0.4.禁用插件,并使用./gradlew:app:dependencies检查您的依赖关系树.

Failed to notify dependency resolution listener. The library com.google.android.gms:play-services-measurement-base is being requested by various other libraries at [[15.0.2,15.0.2], [15.0.4,15.0.4]], but resolves to 15.0.4. Disable the plugin and check your dependencies tree using ./gradlew :app:dependencies.

我尝试了许多发现的不同解决方案,但问题仍然存在. 我对项目根目录上的gradle文件具有正确的依赖项和存储库:

I tried many different solution I found but the problem persists. I have the right dependencies and repositories on gradle file on project root:

dependencies {
    classpath 'com.android.tools.build:gradle:3.1.2'
    classpath 'com.google.gms:google-services:4.0.1'
}

repositories {
    jcenter()
    mavenLocal()
    mavenCentral()
    maven {
        url "https://maven.google.com"
    }
}

在我的应用程序gradle中,我具有以下依赖性:

On my app gradle I have the following dependencies:

implementation "com.google.android.gms:play-services-maps:15.0.1"
implementation "com.google.android.gms:play-services-places:15.0.1"
implementation "com.google.android.gms:play-services-gcm:15.0.1"
implementation "com.google.android.gms:play-services-location:15.0.1"
implementation "com.google.android.gms:play-services-analytics:15.0.2"
implementation "com.google.android.gms:play-services-auth:15.0.1"
implementation "com.google.android.gms:play-services-tagmanager:15.0.2"
implementation "com.google.firebase:firebase-core:16.0.0"

一些建议?

解决方案是更新以下依赖项:

The solution was update the following dependencies:

implementation "com.google.android.gms:play-services-analytics:16.0.0"
implementation "com.google.android.gms:play-services-tagmanager:16.0.0"

推荐答案

我有相同的确切错误,升级analytics是关键:

I had the same exact error, upgrading analytics was the key:

implementation 'com.google.android.gms:play-services-analytics:16.0.0'

我知道您认为官方网站上的所有内容都已更新,但是撰写15.0.0并寻求建议的效果更好.

I know you thought everything is updated referring to the official website, but writing 15.0.0 and looking for suggestions works better.

这篇关于Gradle同步失败-播放服务测量基础的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆