最近我在build.gradle文件中更新了所有版本,但每次构建都失败了。
我收到此错误消息
com.google.android.gms库:play-services-measurement-base正在[[15.0.4,15.0.4]]的各个其他图书馆请求,但已解析为15.0.2。禁用插件并使用./gradlew:app:dependencies检查依赖关系树。
com.google.firebase库:firebase-analytics正在[[16.0.0,16.0.0]]的各个其他库请求,但已解析为15.0.2。禁用插件并使用./gradlew:app:dependencies检查依赖关系树。
我已尝试过其他帖子中建议的所有解决方案,例如:
不幸的是,没有任何效果,我很绝望。
我正在使用与Firebase和Firestore本地的反应。
答案 0 :(得分:0)
遇到了同样的错误,整个星期都被卡在上面。我在另一个库中遇到了这个问题,最终不得不手动更改有冲突的库的版本。在这种情况下,./gradlew :app:dependencies
可以突出显示它是哪个程序包。在这种情况下,不会。
在分析依赖关系呼叫中看到的全部是
com.google.firebase:firebase-core:16.0.1
| +--- com.google.firebase:firebase-analytics:16.0.1 (*)
| \--- com.google.firebase:firebase-measurement-connector-impl:16.0.1
| +--- com.google.android.gms:play-services-basement:15.0.1 (*)
| +--- com.google.android.gms:play-services-measurement-base:[16.0.0] -> 16.0.0
| +--- com.google.firebase:firebase-analytics:[16.0.1] -> 16.0.1 (*)
| +--- com.google.firebase:firebase-analytics-impl:[16.1.1] -> 16.1.1 (*)
| +--- com.google.firebase:firebase-common:16.0.0 (*)
| \--- com.google.firebase:firebase-measurement-connector:16.0.0
| \--- com.google.android.gms:play-services-basement:15.0.1 (*)
\--- com.google.firebase:firebase-messaging:17.0.0
+--- com.google.android.gms:play-services-basement:15.0.1 (*)
+--- com.google.android.gms:play-services-tasks:15.0.1 (*)
+--- com.google.firebase:firebase-common:16.0.0 (*)
+--- com.google.firebase:firebase-iid:[16.0.0] -> 16.0.0 (*)
\--- com.google.firebase:firebase-measurement-connector:16.0.0 (*)
这暗示它的解析度是我想要的16.0.1。
compile ("com.google.firebase:firebase-analytics:16.0.1") {
force = true
}
这是我的错误:
* What went wrong:
Failed to notify dependency resolution listener.
> The library com.google.android.gms:play-services-measurement-base is being requested by various other libraries at [[16.0.0,16.0.0]], but resolves to 15.0.2. Disable the plugin and check your dependencies tree using ./gradlew :app:dependencies.
> The library com.google.firebase:firebase-analytics is being requested by various other libraries at [[16.0.1,16.0.1]], but resolves to 15.0.2. Disable the plugin and check your dependencies tree using ./gradlew :app:dependencies.