Firebase Database doesnt write

拥有回忆 提交于 2020-12-27 05:31:31

问题


I am trying to create "id, uid, and picname" branches in my realtime database but nothing does show. The rules are true for all. Also nothing shows up in logcat. It's been bothering me a lot.

    DatabaseReference databaseReference = FirebaseDatabase.getInstance().getReference().child("Logbook").push();
                            //Data will be saved in "Logbook" node.
                            Map<String, Object> updateMap = new HashMap<>();
                            updateMap.put("id", "");
                            updateMap.put("Uid", "");
                            updateMap.put("picName", "");

                            databaseReference.setValue(updateMap);


                            databaseReference.setValue(updateMap).addOnSuccessListener(new OnSuccessListener<Void>()
                            {
                                @Override
                                public void onSuccess(Void aVoid)
                                {
// Values Updated
                                 
                                    
                                }
                            }).addOnFailureListener(new OnFailureListener() {
                                @Override
                                public void onFailure(@NonNull Exception e)
                                {
                                    Log.e("DB", "Error writing value", e);
                                }
                            });

Nothing happens in realtime database, in the firebase console

Dependencies list:

dependencies {
    implementation 'com.android.support:multidex:1.0.3'
    implementation 'com.google.firebase:firebase-auth:20.0.1'
    implementation 'com.google.android.gms:play-services-auth:19.0.0'
    implementation 'com.google.firebase:firebase-database:19.5.1'
    implementation 'com.google.firebase:firebase-firestore:22.0.0'
}

When debug, no "DB" nor "Error Writing Value" appears.

I/oid.yoganetwor: Background young concurrent copying GC freed 25148(1390KB) AllocSpace objects, 8(224KB) LOS objects, 29% free, 3804KB/5376KB, paused 29.537ms total 318.674ms I/TextInputLayout: EditText added is not a TextInputEditText. Please switch to using that class instead. I/Choreographer: Skipped 36 frames! The application may be doing too much work on its main thread. I/OpenGLRenderer: Davey! duration=1005ms; Flags=1, IntendedVsync=4214517390969, Vsync=4215117390945, OldestInputEvent=9223372036854775807, NewestInputEvent=0, HandleInputStart=4215132773200, AnimationStart=4215132813300, PerformTraversalsStart=4215134387500, DrawStart=4215451865300, SyncQueued=4215483849700, SyncStart=4215487366400, IssueDrawCommandsStart=4215487484500, SwapBuffers=4215489718900, FrameCompleted=4215526344700, DequeueBufferDuration=213900, QueueBufferDuration=702500, GpuCompleted=0, I/AssistStructure: Flattened final assist data: 2828 bytes, containing 1 windows, 19 views W/System: Ignoring header X-Firebase-Locale because its value was null. W/System: Ignoring header X-Firebase-Locale because its value was null. D/FirebaseAuth: Notifying id token listeners about user ( VkV7KzCLdjdLGFbjmDraGKFmNGt1 ). D/FirebaseAuth: Notifying auth state listeners about user ( VkV7KzCLdjdLGFbjmDraGKFmNGt1 ).

来源:https://stackoverflow.com/questions/65196789/firebase-database-doesnt-write

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!