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

ribesg

12/09/2019, 11:15 AM
I’m trying to use
@Parcelize
in a multiplatform library, using `expect`/`actual` on
@Parcelize
and
Parcelable
, but I encounter a very weird error when using the
kotlin.android.extensions
plugin on one library: “This class does not have a constructor” on a
data class
. Anyone encountered this?
I mean it’s a data class, I’m pretty sure it cannot exists without a constructor, right? Is it a weird interaction with the multiplatform context?
i

Ivan Kubyshkin [JetBrains]

12/09/2019, 11:25 AM
There is an issue - https://github.com/Kotlin/kotlinx.serialization/issues/73 which looks like your problem.
r

ribesg

12/09/2019, 12:47 PM
Hmm there’s the same message in the end but I’m not sure. What’s weird is that I have another module with an identical build.gradle.kts file in the same project where the Parcelize/Serializable seem to work (at least it compiles) so there should be something different in the code but I don’t see anything... I tried removing the SerialName annotations but no luck
I think I managed to make it build, it was a classic Gradle/IDEA caching some weird state. Killing all Gradle process then clearing all .gradle, build and .idea folders helped
99 Views