问题
This person has a similar issue to me Firebase for android not working in my test device suddenly but it was never answered, and the people in the comments seem to have a similar issue.
I can access (and update) values in my firebase using nodejs but when I try to do it from android, there are no failures in logcat or anything, it just does not update anything in the database.
I checked the database reference and it's exactly the same as in my nodejs script, and my security settings are read: true
, write: true
... It just doesn't make sense why it's not working anymore. The exact same code was working fine yesterday.
Does anyone know what could be going on?
回答1:
After spending HOURS on this myself - the revolutionary solution is to quit the emulator and reopen it again / restart your device.
回答2:
I had the exact same issue. Looked almost all the blogs,even contacted firebase support as well but couldn't find the solution. Finally here is the solution. Just update your existing google-services.json from Firebase->Your project's Project Settings. Rebuild the app and try it out!
来源:https://stackoverflow.com/questions/42755335/firebase-on-android-suddenly-not-working