【发布时间】:2018-08-30 17:56:14
【问题描述】:
这是我的代码,我正在将学生姓名和批次名称上传到 firebase 数据库。该方法在用户创建账号成功后执行。 在 Authentication 中创建了用户,但数据没有上传到数据库,logcat 中唯一的错误是:
E/SpellCheckerSession:由于意外 mState=TASK_CLOSE scp.mWhat=TASK_CLOSE 而忽略 processOrEnqueueTask
private void uploadUserDetails(){
String name = studentName.getText().toString();
String batch = "BCA";
database = FirebaseDatabase.getInstance();
DatabaseReference ref = database.getReference(firebaseAuth.getUid());
Student student = new Student(name,batch);
ref.child("Student Details").setValue(student);
}
public class Student {
public String name;
public String batch;
Student(){
this.name= "Hello";
this.batch="Unspecified";
}
Student(String name,String batch){
this.name=name;
this.batch=batch;
}
}
【问题讨论】:
-
贴出学生班级也
-
您确定该错误与实时数据库有关吗?我觉得它不熟悉。
-
我不知道,Firebase 数据库上的数据没有更新,这是我在 logcat 中遇到的唯一错误
-
你能把整个 logcat 包括进来吗?
标签: android firebase firebase-realtime-database