yale8848 / RetrofitCache

RetrofitCache让retrofit2+okhttp3+rxjava配置缓存如此简单。通过注解配置,可以针对每一个接口灵活配置缓存策略;同时让每一个接口方便支持数据模拟,可以代码减小侵入性,模拟数据可以从内存,Assets,url轻松获取。
MIT License
676 stars 85 forks source link

报错NoSuchMethodException #26

Open ejwdhr opened 6 years ago

ejwdhr commented 6 years ago

Mobile:

Android OS:

NetWork:

LIB Version:


报错了,是我使用的姿势不对吗。。

09-14 16:50:03.380 15736-15736/com.whfp.tongpao W/retrofitcache: java.lang.NoSuchMethodException: toRequest [class [Ljava.lang.Object;] 09-14 16:50:10.548 15736-15736/com.whfp.tongpao W/retrofitcache: java.lang.NoSuchMethodException: toRequest [class [Ljava.lang.Object;] 09-14 16:50:10.603 15736-15736/com.whfp.tongpao W/System.err: at ren.yale.android.retrofitcachelibrx2.intercept.CacheForceInterceptorNoNet.intercept(CacheForceInterceptorNoNet.java:45) 09-14 16:50:25.065 15736-15736/com.whfp.tongpao W/retrofitcache: java.lang.NoSuchMethodException: toRequest [class [Ljava.lang.Object;]

yale8848 commented 6 years ago

混淆配置添加了吗?

-dontwarn ren.yale.android.retrofitcachelibrx2.**
-keep class ren.yale.android.retrofitcachelibrx2.** { *; }
-keepclasseswithmembernames class  retrofit2.adapter.rxjava2.BodyObservable { *; }
-keepclasseswithmembernames class  retrofit2.adapter.rxjava2.ResultObservable { *; }
-keepclasseswithmembernames class  retrofit2.adapter.rxjava2.CallEnqueueObservable { *; }
-keepclasseswithmembernames class  retrofit2.adapter.rxjava2.CallExecuteObservable { *; }
-keepclasseswithmembernames class retrofit2.Retrofit { *; }
-keepclasseswithmembernames class retrofit2.ServiceMethod { *; }
-keepclasseswithmembernames class retrofit2.OkHttpCall { *; }

` #retrofit2,okhttp3,rxjava2等其它混淆配置请自行添加 `
ejwdhr commented 6 years ago

我还没有打包哦

ejwdhr commented 6 years ago

没有混淆跟混淆配置应该没有关系吧。

yale8848 commented 5 years ago

1.可以把你配置贴出来看看; 2.Exception信息帖全一点;