https://kotlinlang.org logo
#compose
Title
# compose
f

FunkyMuse

06/23/2021, 3:16 PM
Hey guys, anyone running into a weird issue where using compose with pro-guard enabled, minify and shrink resources gets this exception when using Retrofit with Moshi code-gen ? Everything works fine in debug mode without proguard, same network code is used on non-compose project, there isn't any crash like this.
java.lang.ClassCastException: java.lang.Class cannot be cast to java.lang.reflect.ParameterizedType
e

ephemient

06/23/2021, 3:32 PM
sounds like proguard is stripping signatures, see if
-keepattributes Signature
or something like that helps
although there might just be unresolved issues around it, https://issuetracker.google.com/issues/188842731
f

FunkyMuse

06/23/2021, 3:40 PM
yeah, it seems that everything is fine if i disable fullMode 😕
Copy code
android.enableR8.fullMode=false
thanks!
e

eygraber

06/23/2021, 9:59 PM
If you want more in depth discussion about what is going on, and how you can fix it, check out https://issuetracker.google.com/issues/188703877
We were able to keep fullMode on
f

FunkyMuse

06/23/2021, 10:14 PM
Thank you!
36 Views