Ernest Zamelczyk
10/11/2018, 6:36 AMcom.fasterxml.jackson.databind.exc.InvalidDefinitionException: Cannot construct instance of `fi.millisecond.canvas.flow.data.models.b.d` (no Creators, like default construct, exist): cannot deserialize from Object value (no delegate- or property-based Creator)
The class that’s referenced here looks like this:
data class ConfigResponse(val appConfig: AppConfigPrimitive)
Without proguard it’s working perfectly, but with it I have this exception
The rules I’m using right now (after hours of googling and adding different ones) are these:
-keep class com.fasterxml.jackson.databind.ObjectMapper {
public <methods>;
protected <methods>;
}
-keep class com.fasterxml.jackson.databind.ObjectWriter {
public ** writeValueAsString(**);
}
-keepnames class com.fasterxml.jackson.** { *; }
-dontwarn com.fasterxml.jackson.databind.**
-keep,allowobfuscation @interface kotlin.Metadata
-keepclassmembers @kotlin.Metadata class * {
<methods>;
}
-keep class kotlin.reflect.** { *; }
-keepclassmembers,allowoptimization enum * {
public static **[] values();
public static ** valueOf(java.lang.String);
**[] $VALUES;
public *;
}
If anybody is interested in helping me solve this issue it would be really nice. I can also post my proguard logs if you want.