https://kotlinlang.org logo
#multiplatform
Title
# multiplatform
b

Benoît

04/22/2021, 8:33 AM
So I've set this up:
Copy code
// COMMON MAIN
expect annotation class Parcelize()
expect interface Parcelable

// JVM MAIN
actual interface Parcelable
actual annotation class Parcelize actual constructor()

// ANDROID MAIN
actual typealias Parcelize = kotlinx.parcelize.Parcelize
actual interface Parcelable : android.os.Parcelable
I can pass objects between Activities/Fragment without a problem, but when my Fragment gets stopped, or if I try to call
writeToParcel
myself, my app crashes:
Copy code
java.lang.AbstractMethodError: abstract method "void android.os.Parcelable.writeToParcel(android.os.Parcel, int)"
Any idea?
e

ephemient

04/22/2021, 8:52 AM
b

Benoît

04/22/2021, 9:01 AM
I've reported the bug, thanks
4 Views