问题
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