com.google.firebase.database.DatabaseException: Serializing Arrays is not supported, please use Lists instead

前端 未结 7 670
佛祖请我去吃肉
佛祖请我去吃肉 2021-01-07 19:57

I am trying to persist a custom object using the following code:

DatabaseReference databaseReference = FirebaseDatabase.getInstance().getReference();
Databas         


        
7条回答
  •  温柔的废话
    2021-01-07 20:43

    Add @Exclude to the functions that FB tries to interpret, like those that return a Drawable.

    @Exclude
    public Drawable getUnitColorImage(){
        return TextDrawable.builder().buildRound("", prefColor);
    }
    

提交回复
热议问题