Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hawk V2.0.1, illegal type variable reference #234

Open
abdullahjhussein opened this issue May 16, 2019 · 4 comments
Open

Hawk V2.0.1, illegal type variable reference #234

abdullahjhussein opened this issue May 16, 2019 · 4 comments

Comments

@abdullahjhussein
Copy link

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.(SourceFile:4)

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

@alexeygron
Copy link

alexeygron commented May 18, 2019

decision #195 (comment)

@lemberh
Copy link

lemberh commented Jun 19, 2019

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
}

@mezhevikin
Copy link

@lemberh You saved my day. thk

@ahan530
Copy link

ahan530 commented Feb 4, 2021

thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants