Search code examples
androidfirebasefirebase-realtime-databasesetvalue

setValue method error in firebase database creation (android studio0


I created a new project from scratch in android studio and tried connecting it to the firebase by following steps provided in help>firebase>database.

I got green checked for connecting app to firebase but I set up dependencies correctly . however I get setvalue method error.

I have attached a screenshot.

screenshot


Solution

  • Capitalisation is very important.

    myRef.setvalue("Hello World"); // this will not work
    myRef.setValue("Hello World"); // this will work