java.lang.ClassNotFoundException: Didn't find class "kotlinx.serialization.json.Json" on path: DexPathLis
When dexguarding the APK and running Kotlin from JSON to data serialization, I'm getting this crash exception:
java.lang.ClassNotFoundException: Didn't find class "kotlinx.serialization.json.Json" on path: DexPathList. However, it is working fine in debug mode.
I tried to include all Kotlin serialization classes, but I'm still getting the exception.
`java.lang.NoClassDefFoundError: Failed resolution of: Lkotlinx/serialization/json/Json;
Caused by: java.lang.ClassNotFoundException: Didn't find class "kotlinx.serialization.json.Json" on path: DexPathList`
Attach a code snippet or test data if possible.
Expected behavior
Environment
- Kotlin version: 1.8.0
- Library version: 1.6.3
- Kotlin platforms:
- Gradle version: 7.4
- IDE version (if bug is related to the IDE) [e.g. IntellijIDEA 2019.1, Android Studio 3.4]
- Other relevant context [e.g. OS version, JRE version, ... ]
Not sure what can be the case, since Json is a regular class and should be processed just as any other usual class. Maybe -keep class kotlinx.serialization.json.** { *; } would help?
If possible, please attach your project here or in another github repo because it is hard to say what happened without a reproducer.
No reproducer