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)只能使用一次

相关推荐
网络风云2 天前
AJAX与Fetch--异步Web请求的深度对比
前端·ajax·okhttp
教练、我想打篮球6 天前
120 同样的 url, header, 参数, 使用 OkHttp 能够成功获取数据, 使用 RestTemplate 报错
http·okhttp·resttemplate·accept
chilavert3186 天前
技术演进中的开发沉思-258 Ajax:自定义事件
前端·ajax·okhttp
chilavert3186 天前
技术演进中的开发沉思-259 Ajax:浏览器历史管理
javascript·ajax·okhttp·状态模式
C182981825758 天前
HttpURLConnection 是 Apache HttpClient 和 OKHttp 底层吗
okhttp·apache
C182981825758 天前
restTemplate/Feign(Spring Cloud)或OKHttp Apache HttpClient 这几个关系与底层实现
spring cloud·okhttp·apache
码到成功>_<10 天前
使用OkHttp实现接口调用
okhttp
maycho12311 天前
裂隙瓦斯模型的Comsol模拟之旅
okhttp
chilavert31818 天前
技术演进中的开发沉思-235 Ajax:动态数据(上)
javascript·ajax·okhttp
灰什么鱼19 天前
OkHttp + Retrofit2 调用第三方接口完整教程(以nomad为例)
java·spring boot·okhttp·retrofit