我刚刚将 v6.2.0添加到我的React Native应用程序中。它以前在使用身份验证和消息传递模块时构建得很好。
现在,当我构建应用程序时,我得到了错误:
> 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:
...
我正在开发一个使用Firebase进行身份验证的本机应用程序。
当我启动身份验证请求时,它会导致以下错误:
N {code: "auth/network-request-failed", message: "A network error (such as timeout, interrupted connection or unreachable host) has occurred."}
下面是我用来验证/创建用户的代码。注意:我使用redux来维护状态。
firebase.auth().signInWithEmailAndPassword(email, p
react-native-firebase/app << set complete and call OK
import Firebase from "@react-native-firebase/app"
import Database from "@react-native/firebase/database <<<error start,,,,
Database().ref("users/"+ "userId").set({
hopoint:5,
userPo
我是新来的火基地和反应本地人。当我将电子邮件身份验证添加到应用程序并更新身份验证规则时,我得到了一个丢失或特权不足的错误。
当试图在componentDidMount函数中写入Screen1中的Firestore时,我会收到这个错误。
我为我的应用程序添加了以下规则。
rules_version = '2';
service cloud.firestore {
match /databases/{database}/documents {
match /{document=**} {
allow read, write: if request.auth
如何在firebase android应用中添加用户角色认证?据我所知,firebase只有电子邮件和密码身份验证。我想开发一个具有2+用户角色的安卓应用程序。例如,如果一个普通会员登录,他将进入normal_memberActivity,如果他是高级会员,他将进入premium_memberActivity。如何在firebase中添加角色?找不到和我类似的问题。
通常,我会这样做:
String role = intent.getStringExtra("role");
if (role.equals("admin")){
FragmentManager
摘要 我在我的项目中使用了react-native-firebase,并且我运行的是纯react-native (No Expo)。然而,在对Firestore上的任何文档发出get请求时,都不会给出响应。也就是说,在try-catch块中,它既不会解析,也不会被拒绝,它会一直运行下去。(是的,我知道promise,并且我使用await/async,所以它不是等待promise完成,事实上,主要的事情是promise没有得到解决/拒绝) 主要的问题是这个问题是随机出现的,它不是每次都失败,它是随机发生的。通过仔细观察,我还观察到,这种情况主要发生在我不断执行get请求时,例如,我有一个查询,