小编Gio*_*gio的帖子

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

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

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

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

dependencies {
    classpath 'com.android.tools.build:gradle:3.1.2'
    classpath 'com.google.gms:google-services:4.0.1'
}
Run Code Online (Sandbox Code Playgroud)

repositories {
    jcenter()
    mavenLocal()
    mavenCentral()
    maven {
        url "https://maven.google.com"
    }
}
Run Code Online (Sandbox Code Playgroud)

在我的应用程序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"
Run Code Online (Sandbox Code Playgroud)

一些建议?

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

implementation "com.google.android.gms:play-services-analytics:16.0.0"
implementation "com.google.android.gms:play-services-tagmanager:16.0.0"
Run Code Online (Sandbox Code Playgroud)

android gradle google-play-services android-studio android-gradle-plugin

41
推荐指数
4
解决办法
5万
查看次数