微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

android – Gradle sync失败 – play-services-measurement-base

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

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文件中有正确的依赖项和存储库:

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上,我有以下依赖项:

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"

一些建议?

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

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

解决方法:

我有同样的错误,升级分析是关键:

实施’com.google.android.gms:play-services-analytics:16.0.0′

我知道你认为所有内容都是根据官方网站更新的,但是编写15.0.0并寻找建议会更好.

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。

相关推荐