[英]Could not resolve com.google.firebase:firebase-bom:[15.0.0, 16.0.0)
I am getting the following error message when trying to compile an Android app:尝试编译 Android 应用程序时收到以下错误消息:
> Could not resolve com.google.firebase:firebase-bom:[15.0.0, 16.0.0).
Required by:
project :app > project :@react-native-firebase_analytics
project :app > project :@react-native-firebase_app
> Failed to list versions for com.google.firebase:firebase-bom.
> Unable to load Maven meta-data from https://github/com/jitsi/jitsi-maven-repository/raw/master/releases/com/google/firebase/firebase-bom/maven-metadata.xml.
From my reading, it looks like I am missing something in my implementations.从我的阅读来看,我的实现中似乎缺少一些东西。 I have the following:
我有以下几点:
implementation 'com.google.android.gms:play-services-base:15.0.2'
implementation "com.google.firebase:firebase-core:16.0.1"
implementation "com.google.firebase:firebase-messaging:17.4.0"
What else should I be adding?我还应该添加什么? Is there any documentation on this that I'm just not seeing?
是否有任何我没有看到的关于此的文件?
Also tried adding:还尝试添加:
implementation "com.google.firebase:firebase-bom:16.0.0"
No luck.没运气。
EDIT: it seems like it might be related to this:编辑:似乎它可能与此有关:
configurations.all {
resolutionStrategy.eachDependency { DependencyResolveDetails details ->
def requested = details.requested
if (requested.group == 'com.google.android.gms') {
details.useVersion '12.0.1'
}
if (requested.group == 'com.google.firebase') {
details.useVersion '12.0.1'
}
}
}
in build.gradle在 build.gradle 中
Change firebase-core
from:将
firebase-core
更改为:
implementation "com.google.firebase:firebase-core:16.0.1"
into this:进入这个:
implementation "com.google.firebase:firebase-core:16.0.7"
And add the following dependency:并添加以下依赖项:
implementation "com.google.firebase:firebase-bom:16.0.0"
The current version of Firebase BoM is 24.2.0
. Firebase BoM的当前版本是
24.2.0
。 While frankly speaking, why do you even need it?坦率地说,你为什么甚至需要它? It's just a meta package, which bloats the APK - and delete that
configurations.all
block, too.它只是一个元包,它使 APK 膨胀 - 并删除该
configurations.all
块。 That BoM
dependency and the manipulation of version numbers can both be ditched. BoM
依赖和版本号的操作都可以被抛弃。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.