https://kotlinlang.org logo
#android
Title
# android
s

Shan

10/14/2019, 11:28 PM
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

Daniel Rampelt

10/15/2019, 12:32 AM
Did you add the serialization proguard rules to your project? The readme has them here: https://github.com/Kotlin/kotlinx.serialization#androidjvm
s

Shan

10/16/2019, 6:00 PM
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.
457 Views