I'm receiving `java.lang.AbstractMethodError: abst...
# android
g
I'm receiving
java.lang.AbstractMethodError: abstract method "void android.os.Parcelable.writeToParcel(android.os.Parcel, int)"
when putting the app in background, after saving a parcelable (using
Parcelize
) in
onSaveInstanceState
:
Copy code
override fun onSaveInstanceState(outState: Bundle) {
    outState.putParcelable("test", Test())
    super.onSaveInstanceState(outState)
}

@Parcelize
data class Test(val test: String = "test"): Parcelable
It does not occur on configuration changes though. I'm using AS 4.0 Canary 4, with kotlin
1.3.60-eap-25
. Any idea of what am I doing wrong here?
d
It’s not a root cause but put your data before calling super
👍 1
g
Investigating a little further, AbstractMethodError occurs when
Thrown when an application tries to call an abstract method. Normally, this error is caught by the compiler; this error can only occur at run time if the definition of some class has incompatibly changed since the currently executing method was last compiled.
🤔
372 Views