有没有办法在 Firebase 控制台中手动创建推送 ID?

Is there any way to create push ID manually in Firebase console?

在我的 java 代码中,我知道如何通过调用 push() 方法

创建唯一 ID
DatabaseReference().child("list").push();

我的问题是:

有没有办法在 Firebase 实时数据库控制台中手动执行此操作?我是说在网站上?

不,您不能在 firebase 控制台中手动创建 push() id。您可以在控制台中手动添加随机 numbers/letters,但这对您以后没有帮助。

您使用 push() 为每个新的 child 生成唯一键,从而防止覆盖数据。

示例:

Users
  pushid_here
      name: userx
      age: 100
  pushid_here
      name: usery
      age: 121

然后当您查询时,您可以使用getKey() 获取推送密钥并能够访问其中的数据。这就是为什么你在评论中说的 firebaserecyclerview 只适用于 push().

更多信息:https://firebase.google.com/docs/database/admin/save-data#getting-the-unique-key-generated-by-push