简体   繁体   English

无法解析 com.google.firebase:firebase-bom:[15.0.0, 16.0.0)

[英]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.

相关问题 无法解析com.google.firebase:firebase-database:11.8.0 - Could not resolve com.google.firebase:firebase-database:11.8.0 无法解析:com.google.firebase:firebase-core:16.0.1 - Failed to resolve: com.google.firebase:firebase-core:16.0.1 “无法解决:com.google.firebase:firebase-core:9.0.0” - “Failed to resolve: com.google.firebase:firebase-core:9.0.0” “找不到 com.google.firebase:firebase 分析” - "Could not find com.google.firebase:firebase-analytics" Firebase设置-错误:无法解决:com.google.firebase:firebase-core:12.0.1 - Firebase set up- error: Failed to resolve: com.google.firebase:firebase-core:12.0.1 如何解决未解析的依赖 ':app@debug/compileClasspath': 无法解析 com.google.android.gms:play-services-base:[15.0.0, 16.0.0) - How to solve the unresolve dependency ':app@debug/compileClasspath': Could not resolve com.google.android.gms:play-services-base:[15.0.0, 16.0.0) 找不到参数[com.google.firebase:firebase-core:16.0.1]的方法Implementation() - Could not find method implementation() for arguments [com.google.firebase:firebase-core:16.0.1] 找不到参数的方法 implementation() [com.google.firebase:firebase-core:17.0.0] - Could not find method implementation() for arguments [com.google.firebase:firebase-core:17.0.0] 错误:无法解决:com.google.firebase:firebase-core:18.1.0在“项目结构”对话框中显示受影响的模块:app - ERROR: Failed to resolve: com.google.firebase:firebase-core:18.1.0 Show in Project Structure dialog Affected Modules: app 无法解析firebase-database-15.0.0 - Failed to resolve firebase-database-15.0.0
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM