Retrofit 混淆以后发生 ParameterizedType error 解决办法

出现报错

java.lang.ClassCastException: java.lang.Class cannot be cast to java.lang.reflect.ParameterizedType

混淆规则中加入如下规则:

 -keep,allowobfuscation,allowshrinking interface retrofit2.Call
 -keep,allowobfuscation,allowshrinking class retrofit2.Response
 # With R8 full mode generic signatures are stripped for classes that are not
 # kept. Suspend functions are wrapped in continuations where the type argument
 # is used.
 -keep,allowobfuscation,allowshrinking class kotlin.coroutines.Continuation

参考了