Anyone run into Proguard issues using Kotlinx-Seri...
# android
s
Anyone run into Proguard issues using Kotlinx-Serialization? Getting this error which is making me suspicious it's either an issue with Proguard or R8 (or, a serialization issue, which I don't think is actually happening)
j.b.u: Can't locate argument-less serializer for class e.b.b.d.a (Kotlin reflection is not available). For generic classes, such as lists, please provide serializer explicitly.
d
Did you add the serialization proguard rules to your project? The readme has them here: https://github.com/Kotlin/kotlinx.serialization#androidjvm
s
The reason was that Ktor was trying to use reflection to find the Serializer instead of detecting it without. After setting it explicitly with
setMapper(KClass, KSerializer)
it is now working.
506 Views