【问题标题】:cannot resolve the symbol "path"无法解析符号“路径”
【发布时间】:2020-12-12 14:32:54
【问题描述】:

我正在尝试使用我的 android 应用程序连接到 firebase 数据库,但我无法使用“路径”关键字来获取参考。它强调了它。我不知道为什么我是 Android 的初学者,而且我从未使用过 firebase,所以我对 firebase 数据库知之甚少。这是代码

progressBar.setVisibility(View.VISIBLE);
        mAuth.createUserWithEmailAndPassword(email, password)
                .addOnCompleteListener(new OnCompleteListener<AuthResult>() {
                    @Override
                    public void onComplete(@NonNull Task<AuthResult> task) {

                        if(task.isSuccessful()){
                            User user = new User(fullName, age, email);

                            FirebaseDatabase.getInstance().getReference( path: "Users")




                        }
                    }
                });

【问题讨论】:

  • 带路径...您可以引用数据库中的位置,这样基本上就是存储或存储数据的位置。

标签: android firebase-realtime-database firebase-authentication


【解决方案1】:

在 Java 中,参数没有名称,而是按需要的顺序传递。所以:

FirebaseDatabase.getInstance().getReference("Users")

【讨论】:

  • 你救了我非常感谢我真的很感谢它
猜你喜欢
  • 1970-01-01
  • 2015-07-21
  • 2021-12-30
  • 2018-11-11
  • 2019-01-28
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多