尝试编译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. 

从我的阅读看来,我在实现中似乎缺少了一些东西。 我有以下几点:

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" 

我还应该添加什么? 有没有我没有看到的文档?

还尝试添加:

implementation "com.google.firebase:firebase-bom:16.0.0" 

没运气。

编辑:似乎它可能与此有关:

    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'             }         }     } 

在build.gradle中

===============>>#1 票数:0

firebase-core从:

implementation "com.google.firebase:firebase-core:16.0.1" 

到这个:

implementation "com.google.firebase:firebase-core:16.0.7" 

并添加以下依赖项:

implementation "com.google.firebase:firebase-bom:16.0.0" 

  ask by Cecil Rodriguez translate from so

===============>>#2 票数:0

Firebase BoM的当前版本为24.2.0 坦白地说,您为什么甚至需要它? 这只是一个元数据包,它使APK膨胀-并删除了configurations.all块。 BoM依赖性和版本号的操纵都可以放弃。

  ask by Cecil Rodriguez translate from so

本文未有回复,本站智能推荐: