Android Kotlin firebase.database.DatabaseException: No properties to serialize found on class

前端 未结 3 1933
北荒
北荒 2020-12-22 13:44

I have followed the advice of other SO solution: 1. Make my class Serializeable 2. Have a default constructor for Firebase 3. Update my proguard rules (Not sure about this o

3条回答
  •  一整个雨季
    2020-12-22 14:02

    you can easily use a data class, it already comes with an empty constructor ect.

    @IgnoreExtraProperties
    data class User(
        var displayName: String? = null,
        var email: String? = null,
        var photoUrl : String? = null,
        var userId: String? = null
    )
    

提交回复
热议问题