FATAL EXCEPTION: OkHttp Dispatcher

E/AndroidRuntime: FATAL EXCEPTION: OkHttp Dispatcher

Process: com.inspur.zxzzfw, PID: 32184

java.lang.NullPointerException: interceptor com.inspur.zxzzfw.base.BaseApp b @ a 7 f 649 d r e t u r n e d n u l l a t b 7. g . b ( S o u r c e F i l e : 239 ) a t b 7. g . p r o c e e d ( U n k n o w n S o u r c e : 9 ) a t o k h t t p 3. R e a l C a l l . g e t R e s p o n s e W i t h I n t e r c e p t o r C h a i n ( S o u r c e F i l e : 123 ) a t o k h t t p 3. R e a l C a l l b@a7f649d returned null at b7.g.b(SourceFile:239) at b7.g.proceed(Unknown Source:9) at okhttp3.RealCall.getResponseWithInterceptorChain(SourceFile:123) at okhttp3.RealCall b@a7f649dreturnednullatb7.g.b(SourceFile:239)atb7.g.proceed(UnknownSource:9)atokhttp3.RealCall.getResponseWithInterceptorChain(SourceFile:123)atokhttp3.RealCallAsyncCall.run(SourceFile:52)

at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1137)

at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:637)

at java.lang.Thread.run(Thread.java:1015)


错误原因: response.body().string()中的 (.string)只能使用一次

相关推荐
朝星7 天前
Android开发[14]:网络优化之OkHttp
android·okhttp·kotlin
之歆9 天前
Promise 基础技术深度解析:从回调地狱到链式调用
前端·okhttp·promise
之歆9 天前
Ajax 基础技术深度解析:XHR 从入门到跨域
前端·ajax·okhttp
YHHLAI9 天前
Ajax — 异步数据交互
ajax·okhttp·交互
Xaire18 天前
行行查案例-数据解密-国密s4-webpack打包模块补齐
okhttp
霸道流氓气质19 天前
Spring AI Ollama 连接超时问题排查与解决:OkHttp 读超时配置全指南
人工智能·spring·okhttp
你觉得脆皮鸡好吃吗1 个月前
XSS渗透 COOKIE
网络·http·okhttp·网络安全学习
彭于晏Yan1 个月前
OkHttp 与 RestTemplate 技术选型对比
java·spring boot·后端·okhttp
JohnnyDeng941 个月前
OkHttp 拦截器链与缓存策略:深度解析网络层的核心机制
okhttp·缓存
胖胖胖胖胖虎1 个月前
okhttp Stream Load 含认证请求重定向
starrocks·okhttp