Implements Serializable on RealmObject 0.88

淺唱寂寞╮ 提交于 2019-12-12 02:59:12

问题


I've been to see the new updates of the Realm 0.88 and I found this interesting:

  • Implement interfaces.

Well, I try implement an interface (Serializable) without success. when I put a object on the intent I get this error:

java.lang.RuntimeException: Parcelable encountered IOException writing serializable object (name = com.test.realmtest.network.search.response.Hotel)"

I'm doing something wrong?


回答1:


Even though RealmObjects support interfaces, they are not parcelable. At least not yet. There is an issue tracking it here: https://github.com/realm/realm-java/issues/878

There is a work-around described here: https://realm.io/docs/java/latest/#intents



来源:https://stackoverflow.com/questions/35985328/implements-serializable-on-realmobject-0-88

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!