close

[Solved] firebase real-time database unable to write data

Hello Guys, How are you all? Hope You all Are Fine. Today I am implementing Firebase in my project But firebase real-time database unable to write data in java. So Here I am Explain to you all the possible solutions here.

Without wasting your time, Let’s start This Article to Solve This Error.

How firebase real-time database unable to write data Error Occurs ?

I am implementing Firebase in my project And I am trying to write data in the firebase database But the firebase real-time database is unable to write data. I am facing the following error.

2021-08-06 22:57:51.467 8980-8980/? E/e.firebasefetc: Unknown bits set in runtime_flags: 0x8000
2021-08-06 22:57:52.207 8980-9018/com.example.upcApp E/Perf: Fail to get file list com.example.upcApp
2021-08-06 22:57:52.208 8980-9018/com.example.upcApp E/Perf: getFolderSize() : Exception_1 = java.lang.NullPointerException: Attempt to get length of null array
2021-08-06 22:57:52.209 8980-9018/com.example.upcApp E/Perf: Fail to get file list com.example.upcApp
2021-08-06 22:57:52.209 8980-9018/com.example.upcApp E/Perf: getFolderSize() : Exception_1 = java.lang.NullPointerException: Attempt to get length of null array
2021-08-06 22:57:52.553 8980-8980/com.example.upcApp E/AndroidRuntime: FATAL EXCEPTION: main
    Process: com.example.upcApp, PID: 8980
    java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.upcApp/com.example.upcApp.MainActivity}: java.lang.IllegalStateException: Default FirebaseApp is not initialized in this process com.example.upcApp. Make sure to call FirebaseApp.initializeApp(Context) first.

How To Solve firebase real-time database unable to write data Error ?

  1. How To Solve firebase real-time database unable to write data Error?

    To Solve firebase real-time database unable to write data Error Here The problem Is Google has broken something in google-services:4.3.9 So we just need to downgrade google-services to google-services:4.3.8 here is How. Just Change this below line present in your build.gradle file.

  2. firebase real-time database unable to write data

    To Solve firebase real-time database unable to write data Error Here The problem Is Google has broken something in google-services:4.3.9 So we just need to downgrade google-services to google-services:4.3.8 here is How. Just Change this below line present in your build.gradle file.

Solution 1: Downgrade google-services to google-services:4.3.8

Here The problem Is Google has broken something in google-services:4.3.9 So we just need to downgrade google-services to google-services:4.3.8 here is How.

Just Change this below line present in your build.gradle file.


classpath 'com.google.gms:google-services:4.3.9'

Change it to


classpath 'com.google.gms:google-services:4.3.8'

Summery

It’s all About this issue. Hope all solution helped you a lot. Comment below Your thoughts and your queries. Also, Comment below which solution worked for you?

Also Read

Please Rate Our Solution to Motivate Us For Give Our Best

Leave a Comment