I am trying to persist a custom object using the following code:
DatabaseReference databaseReference = FirebaseDatabase.getInstance().getReference();
Databas
In case this helps others that are receiving the same error, I was getting the same error and the solution ended up being the following for me:
Changing:
databaseReference.child("somechild").setValue(etName.getText());
To:
databaseReference.child("somechild").setValue(etName.getText().toString());
As @fraggjkee points out, Firebase attempts to serialize getters, and this was the similar issue here with firebase attempting to serialize the result of the .getText()
.
Hope this helps others!