Fabio
08/03/2023, 11:17 AMParcelable
and Parcelize
in my KMP module defined like so:
expect interface Parcelable
@Target(AnnotationTarget.CLASS)
@Retention(AnnotationRetention.BINARY)
expect annotation class Parcelize()
and fulfilled on Android like so:
actual typealias Parcelable = android.os.Parcelable
actual typealias Parcelize = kotlinx.parcelize.Parcelize
This works well at runtime, however classes in the Android module that are themselves annotated with kotlinx.parcelize.Parcelize
and have properties with types from the KMP module which are Parcelable/Parcelize cause an error to be shown in the IDE:
Type is not directly supported by 'Parcelize'. Annotate the parameter type with '@RawValue' if you want it to be serialized using 'writeValue()'
Does anyone know of a way to silence or suppress these errors? Or am I doing something wrong?Zsolt.bertalan
08/05/2023, 4:32 PMArkadii Ivanov
08/05/2023, 4:47 PMZsolt.bertalan
08/06/2023, 2:47 PM