Avatar ·

Proguard complains about Missing classes after adding packages to proguard-rules.pro

Hi everyone! I've been struggling with this problem for several days. The project is in Kotlin, using obfuscation via R8 (Android Gradle Plugin 7.4+). Everything was working fine until I started integrating several third-party libraries (Retrofit, Gson, Room). \n\nI added rules to `proguard-rules.pro` to preserve data models:\n\n```\n-keep class com.myapp.data.model.** { *; }\n-keep class com.myapp.data.remote.** { *; }\n```\n\nAnd for Retrofit:\n\n```\n-keepattributes Signature\n-keepattributes *Annotation*\n-keep class retrofit2.** { *; }\n-keepclasseswithmembers class * {\n @retrofit2.http.* ;\n}\n```\n\nBut when building the release version (minifyEnabled true), I get errors:\n\n```\nMissing classes detected while running R8:\ncom.google.gson.internal.ConstructorConstructor\ncom.google.gson.interna