Firebase DatabaseException: Failed to convert value of type java.lang.Long to String

前端 未结 7 1178
挽巷
挽巷 2020-12-01 14:50

com.google.firebase.database.DatabaseException: Failed to convert value of type java.lang.Long to String

is the error I keep getting w

7条回答
  •  暗喜
    暗喜 (楼主)
    2020-12-01 15:33

    The problem is that you are creating the property "mobile_phone" as a String and on Firebase it is a Long type.

    Change:

    private String mobile_phone;
    

    To:

    private Long mobile_phone;
    

提交回复
热议问题