将react-native-firebase / firestore导入我的应用程序后,出现构建错误'找不到com.google.firebase:firebase-bom:21.3.0。'

问题描述 投票:1回答:1

我刚刚将react-native-firebase/firestore v6.2.0添加到了我的React Native应用中。以前使用auth和消息传递模块时,它的运行情况良好。

现在在构建应用程序时出现错误:

> Could not resolve all task dependencies for configuration ':app:debugRuntimeClasspath'.
   > Could not find com.google.firebase:firebase-bom:21.3.0.
     Searched in the following locations:
       ...
     Required by:
         project :app > project :@react-native-firebase_messaging
         project :app > project :@react-native-firebase_app
         project :app > project :@react-native-firebase_auth

我不确定此文件是什么或为什么将其删除。

任何帮助,不胜感激!

android firebase react-native react-native-firebase
1个回答
0
投票

经过一些跟踪后,我发现com.google.firebase:firebase-bom:21.3.0丢失了Maven repositories

这让我相信它不存在。在react-native-firebase文件中进行了一些跟踪之后,我注意到标签v6.1.0具有com.google.firebase:firebase-bom:21.1.0的某些软件包,除了firestore ,其中包含com.google.firebase:firebase-bom:21.3.0。对于v6.2.0

重复此操作

所以...是的,更新依赖项可能存在问题。我可以上传问题来解决此问题。

我的解决方案是使用版本[[v6.0.3]

您可以在本地

node_modules

中手动编辑以下文件:https://github.com/invertase/react-native-firebase/blob/v6.1.0/packages/firestore/android/build.gradle
© www.soinside.com 2019 - 2024. All rights reserved.