gpt4 book ai didi

firebase - 所有 gms/firebase 库必须使用完全相同的版本规范(混合版本可能导致运行时崩溃)

转载 作者:行者123 更新时间:2023-12-03 15:55:07 24 4
gpt4 key购买 nike

我已经升级了gms:play-services-analytics来自 11.0.416.0.4firebase-messaging来自 11.0.417.1.0但是 Lint 给出这个错误

All gms/firebase libraries must use the exact same version specification (mixing versions can lead to runtime crashes). Found versions 17.1.0, 16.2.0, 16.0.4, 16.0.3, 16.0.1, 16.0.0. Examples include `com.google.firebase:firebase-messaging:17.1.0` and `com.google.firebase:firebase-iid:16.2.0`

我查看了 External libraries我可以看到这里使用了不同版本的 gms。
com.google.android.gms:play-services-ads-identifier-16.0.0
com.google.android.gms:play-services-analytics-16.0.4
com.google.android.gms:play-services-analytics-impl-16.0.4
com.google.android.gms:play-services-base-16.0.1
com.google.android.gms:play-services-basement-16.0.1
com.google.android.gms:play-services-measurement-base-16.0.3

相似度
com.google.firebase:firebase-common-16.0.0
com.google.firebase:firebase-iid-16.2.0
com.google.firebase:firebase-iid-interop-16.0.0
com.google.firebase:firebase-messaging-17.1.0

我只添加了以下两个依赖项
implementation 'com.google.android.gms:play-services-analytics:16.0.4' implementation 'com.google.firebase:firebase-messaging:17.3.4'
根级 build.gradle包含
classpath 'com.google.gms:google-services:4.0.1'
正如博客中提到的
https://android-developers.googleblog.com/2018/05/announcing-new-sdk-versioning.html

现在所有的 firebase/gms 库都可以有不同的版本控制,并且上面提到的库是由 android 自己导入的。
为什么我收到此错误?

最佳答案

对我来说,它使用的是相当旧的构建工具版本。更新到构建工具 28.0.3 解决了这个问题。

关于firebase - 所有 gms/firebase 库必须使用完全相同的版本规范(混合版本可能导致运行时崩溃),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54358996/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com