Hawk V2.0.1, illegal type variable reference
java.lang.AssertionError: illegal type variable reference
at libcore.reflect.TypeVariableImpl.resolve(TypeVariableImpl.java:111)
at libcore.reflect.TypeVariableImpl.getGenericDeclaration(TypeVariableImpl.java:125)
at libcore.reflect.TypeVariableImpl.hashCode(TypeVariableImpl.java:47)
at java.util.Arrays.hashCode(Arrays.java:4074)
at com.google.gson.internal.$Gson$Types$ParameterizedTypeImpl.hashCode(SourceFile:1)
at com.google.gson.reflect.TypeToken.
I had this crash in release mode, when try to put ArrayList of object in hawk. Also, i add Progaurd rules related Hawk lib
we use Hawk: V2.0.1 Gson: V2.8.5
decision https://github.com/orhanobut/hawk/issues/195#issuecomment-455837851
I had the same issue, this Proguard rule had fixed my problem
-keep class com.orhanobut.hawk.** { *; }
I was getting custom objects map from Hawk
Hawk.get<MutableMap<String, Request>>(REQUESTS_KEY) //<-- CRASH HERE
@Keep
internal data class Request(
val objId: String,
val objectClass: UploadClass,
val extra: Map<String, String> = emptyMap()
)
@Keep
internal enum class UploadClass {
TYPE_ONE, TYPE_TWO
}
@lemberh You saved my day. thk
thanks