liujingxing / rxhttp

🔥🔥🔥 Based on OkHttp encapsulation, support Kotlin Coroutines、RxJava2、RxJava3; 30s to get started.
https://juejin.im/post/5ded221a518825125d14a1d4
Apache License 2.0
3.74k stars 457 forks source link

java.lang.NullPointerException: <get-cache>(...) must not be null 这种一般是什么问题呀,不是必现,偶尔出现就会闪退。 #493

Closed zzzsssbo closed 4 months ago

zzzsssbo commented 4 months ago

全局缓存目录和缓存模式都配置了

java.lang.NullPointerException: (...) must not be null at rxhttp.wrapper.intercept.CacheInterceptor.getCache(CacheInterceptor.kt:24) at rxhttp.wrapper.intercept.CacheInterceptor.getCacheResponse(CacheInterceptor.kt:72) at rxhttp.wrapper.intercept.CacheInterceptor.intercept(CacheInterceptor.kt:43) at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:100)

liujingxing commented 4 months ago

代码贴出来

zzzsssbo commented 4 months ago

配置缓存的代码吗

liujingxing commented 4 months ago

全局配置及发请求的代码