-
Notifications
You must be signed in to change notification settings - Fork 83
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Forbid unparcelable types #7
Comments
Makes sense. I'll patch it up |
It might be less straightforward than I though. The definition of writeValue is recursive. That means you can have valid nested types such as (If only somebody would embrace the challenge of writing a properly documented library that abstracts over all these compile types weirdness I guess we would see many more APT libraries released). |
Hi guys, I'm sure this is an issue in my code and not with the library, but somewhat related. I have a UserParcel object annotated with@AutoParcel implementing Parcelable with a static reference to my User object (not parcelable), which also contains a custom 'Image' object (also not parcelable) but contains parcelable variables. I am running into this error - the log shows it to crash at the 'if (v instanceof IBinder)' condition in the android Parcel class: java.lang.RuntimeException: Parcel: unable to marshal value User{... public final void writeValue(Object v) { Any ideas where I'm going wrong? |
I had an erroneous
Object
type in one of my classes which was being filled with a type that was not parcelable.Parcel
'swriteValue
does take anObject
but it's very specific about which types are allowed: https://developer.android.com/reference/android/os/Parcel.html#writeValue(java.lang.Object).I want my build to fail if a type is used that does not meet these requirements.
The text was updated successfully, but these errors were encountered: