yangweigbh / VolleyX

Volley + RxJava, use Volley the Rx way
Apache License 2.0
66 stars 5 forks source link

the field name of your class is not correct: mListener #5

Closed narakai closed 7 years ago

narakai commented 7 years ago

onError java.lang.IllegalStateException: the field name of your class is not correct: mListener

I have set mListener in my GsonRequest

yangweigbh commented 7 years ago

is it obfuscated by proguard?

narakai commented 7 years ago

The issue occurs occasionally. I have done some proguard work for volley as below:

-dontwarn com.android.volley. -keep class com.android.volley. {*;} -keep class com.android.volley.toolbox.* {;} -keep class com.android.volley.Response$ { ; } -keep class com.android.volley.Request$ { ; } -keep class com.android.volley.RequestQueue$ { ; } -keep class com.android.volley.toolbox.HurlStack$ { ; } -keep class com.android.volley.toolbox.ImageLoader$ { ; }

yangweigbh commented 7 years ago

-keepclasseswithmembers class { private mListener; private ** mErrorListener; } try add above snippet

narakai commented 7 years ago

Thanks, will have a try. By the way, the class Interception in your library is never used, is it OK to delete this unused class?

yangweigbh commented 7 years ago

the Hack.java use Interception class, if you want to delete the Interception class, remember to delete the reference in Hack.java

narakai commented 7 years ago

Thanks.