Firebase + SugarORM - App崩溃

时间:2016-06-03 15:58:04

标签: android firebase sugarorm dbflow

我有一个类Session,它是一个使用onbaseChange使用Firebase创建的模型。

当我从SugarRecord扩展此模型时,应用程序崩溃并出现以下堆栈跟踪:

FATAL EXCEPTION: main                                                              
com.firebase.client.FirebaseException: Failed to bounce to type
at com.firebase.client.DataSnapshot.getValue(DataSnapshot.java:185)
at xyz.eventapp.apiclient.APIClient$1.onDataChange(APIClient.java:14)
at com.firebase.client.core.ValueEventRegistration.
fireEvent(ValueEventRegistration.java:56)
at
com.firebase.client.core.view.DataEvent.fire(DataEvent.java:45)
at com.firebase.client.core.view.EventRaiser$1.run(EventRaiser.java:38)
at android.os.Handler.handleCallback(Handler.java:739)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:158)
at android.app.ActivityThread.main(ActivityThread.java:7229)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1230)                                                                     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1120)

Caused by: com.fasterxml.jackson.databind.JsonMappingException: Can not     
access private java.lang.reflect.Field() (from class 
java.lang.reflect.Field; failed to set access: Can't make field 
constructor accessible

这不仅适用于SugarRecord,而且适用于任何类似DBFlow的ORM。

那么这是否意味着我无法从使用onDataChange合约创建的模型中扩展任何类?

0 个答案:

没有答案