Hi all. I have a working multiplatform setup that ...
# multiplatform
a
Hi all. I have a working multiplatform setup that uses kotlin serialization. I'm trying to use
multiplatform-settings
but after installing it, I get the following error:
Copy code
Serializer for class 'MyModel' is not found.
I am using the @Serializable annotation with my data class and everything worked prior to installing the library or when I remove it. Any ideas?
j
Do you have the serialization plugin setup?
a
Copy code
install(ContentNegotiation) {
        json(Json {
            prettyPrint = true
            isLenient = true
            ignoreUnknownKeys = true
        })
    }
j
What about in your build.gradle
r
The module you're using shouldn't be pulling in any dependencies other than
androidx.startup
so it's strange that it would have any impact on serialization. What versions of Kotlin and kotlinx-serialization are you using?
Multiplatform Settings 1.0 is built against Kotlin 1.8 so if your on older versions of other stuff then maybe that's causing the issue
a
that's probably it then. Using 1.7.20. I'll give that a try, thanks!
r
1.0.0-RC was built against 1.7.20 if you aren't ready to bump other stuff
a
Ok cool. I'll try that first.
Yep, that was the issue. Using 1.0.0-RC worked. I'll work on bumping kotlin up. Thanks!