简体   繁体   English

FireBase,DatabaseError:权限被拒绝(再次)

[英]FireBase, DatabaseError: Permission denied (Again)

I am trying for a while to connect to FireBase and I`m always getting to我正在尝试连接到 FireBase 并且我总是能够

DatabaseError: Permission denied.数据库错误:权限被拒绝。

I know that this is a question that many asked and might be a duplicate, but as you can see I did almost everything.我知道这是一个很多人问过的问题,可能是重复的,但正如你所看到的,我几乎做了所有的事情。

My Java code:我的Java代码:

DatabaseReference myRef = FirebaseDatabase.getInstance().getReference("Users");
enter code here`myRef.setValue("Hello, World!");
  • I Did all the stpes of Tools>FireBase>RealTime DB我做了工具>FireBase>RealTime DB 的所有步骤

  • I did all the steps of Add Firebase to your Android app (Register app -> "DownLoad config file" and put it in the app folder. -> "Add Firebase SDK" (just higher versions) -> Manually synced Gradle -> Than "Run your app to verify installation" , but here it was stuck and was just waiting also after I started my app我完成了将 Firebase 添加到您的 Android 应用程序的所有步骤(注册应用程序 ->“下载配置文件”并将其放在应用程序文件夹中。->“添加 Firebase SDK”(只是更高版本)-> 手动同步 Gradle -> 比“运行您的应用程序以验证安装”,但在这里它卡住了,并且在我启动我的应用程序后也在等待

  • I tried via almost all StackOverFlow to give full access to every one:我尝试通过几乎所有的 StackOverFlow 来完全访问每一个:

{
  /* Visit https://firebase.google.com/docs/database/security to learn more about security rules. */
  "rules": {
    ".read": true,
    ".write": true
  }
}

you should replace this line of code.你应该替换这行代码。 hope you get the point.希望你明白这一点。

DatabaseReference myRef = FirebaseDatabase.getInstance().getReference("Users");
myRef.setValue("Hello, World!");

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM