Has anyone seen this error before? ```Caused by: k...
# serialization
k
Has anyone seen this error before?
Copy code
Caused by: kotlinx.serialization.SerializationException: Can't locate argument-less serializer for class com.kevincianfarini.saddle.Artist$Impl (Kotlin reflection is not available). For generic classes, such as lists, please provide serializer explicitly.
I've done some searching but none of the solutions I've found have worked.
i
When you look into the Kotlin Bytecode, do you see $serializer on that class?
k
where exactly can I find the class files if I'm building with gradle?
i
Oh sorry, Intellij IDEA
k
so this is the method for assigning a serializer to a class I've used, since the class I want to serialize/deserialize is generated
Copy code
@Serializer(for=SomeClass::class) object SomeClassSerializer
this is the specific bytecode that I've decompiled for that
Copy code
// IntelliJ API Decompiler stub source generated from a class file
// Implementation of methods is not available

package com.kevincianfarini.saddle.util

@kotlinx.serialization.Serializer public object ArtistSerializer : kotlinx.serialization.KSerializer<com.kevincianfarini.saddle.Artist.Impl> {
}
i
I am looking for com.kevincianfarini.saddle.Artist$Impl$seralizer
k
would that be inlined in the class?
if so, I'm not seeing it
i
it shouldn't be inlined.
If you don't see it, it didn't generated that class.
k
interesting
leading to the gradle plugin probably not being properly applied?
i
I guess Yes.
m
https://github.com/Kotlin/kotlinx.serialization#gradle Make sure you setup the corret gradle
plugins
block. Sometimes, missing setup would mess the kotlinx generation class @kevin.cianfarini