Chris Fillmore
10/25/2021, 2:21 PMSerializer for class 'b' is not found at runtime. I’ve added the ProGuard rules from here, substituting my app package name:
https://github.com/Kotlin/kotlinx.serialization#android
Is there any other step? Or something I’m missing?Chris Fillmore
10/25/2021, 2:22 PM1.5.31. I tried upgrading to 1.6.0-RC, this made no differenceChris Fillmore
10/25/2021, 2:23 PM1.5.21Chris Fillmore
10/25/2021, 2:24 PMChris Fillmore
10/25/2021, 2:24 PMephemient
10/25/2021, 3:39 PMStringFormat.encodeToString(value), StringFormat.decodeFromString(), similar on BinaryFormat, SerializersModule { polymorphic(..) { subclass(kclass) } } they use reflection to find the serializer.
if you instead use the member functions StringFormat.encodeToString(serializer, value), StringFormat.decodeFromString(serializer), etc. and pass in the serializer statically (e.g.MyType.serializer(), not MyType::class.serializer()) then no reflection is used, and Proguard should keep everything necessary because it's all referenced directlyChris Fillmore
10/25/2021, 3:54 PMencodeToString(value) / `decodeFromString(value)`extensivelyChris Fillmore
10/25/2021, 3:54 PMChris Fillmore
10/25/2021, 3:54 PMephemient
10/25/2021, 4:01 PMrusshwolf
10/25/2021, 4:33 PMChris Fillmore
10/25/2021, 4:37 PMChris Fillmore
10/25/2021, 4:56 PM