无法从Firebase实时数据库读取数据

我需要将FirebaseDatabase中的数据显示到我的Android测验应用中。当我启动应用程序时,它没有显示任何错误,但是没有显示来自database的数据。 database structure

private void updateQuestion() {
    mQuestionRef = new Firebase("https://maths-quiz-3104f.firebaseio.com/0/biq");
    mQuestionRef.addValueEventListener(new com.firebase.client.ValueEventListener() {
        @Override
        public void onDataChange(com.firebase.client.Datasnapshot datasnapshot) {
            String question = datasnapshot.getvalue(String.class);
            mQuestion.setText(question);


        }

        @Override
        public void onCancelled(FirebaseError firebaseError) {

        }
    });
            if(mQuestionNumber > 10){

                quitFunction();

            }
            else {
                mQuestionNumber++;
            }
}
zhansir720 回答:无法从Firebase实时数据库读取数据

暂时没有好的解决方案,如果你有好的解决方案,请发邮件至:iooj@foxmail.com
本文链接:https://www.f2er.com/3151770.html

大家都在问