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

相关推荐
Dxy12393102161 天前
Ajax如何发送列表数据
前端·ajax·okhttp
96772 天前
AJAX和Axios理解和关系
前端·ajax·okhttp
必胜刻4 天前
AJAX 请求理解
前端·ajax·okhttp·前后端交互
android_cai_niao4 天前
OkHttp 使用教程:从入门到精通(Kotlin)
okhttp·kotlin
qwert103711 天前
跨域问题解释及前后端解决方案(SpringBoot)
spring boot·后端·okhttp
符哥200813 天前
基于 OkHttp+Retrofit 实现 JSON / 表单 / XML/Protobuf 数据格式全解析
okhttp·json·retrofit
XiaoLeisj14 天前
Android 网络编程入门到实战:HttpURLConnection、JSON 处理、OkHttp 与 Retrofit2
android·网络·okhttp·json·gson·retrofit2·jsonobjecy
凯鑫BOSS15 天前
Pbootcms查看详细报错信息
okhttp
vistaup2 个月前
OKHTTP 默认构建包含 android 4.4 的TLS 1.2 以及设备时间不对兼容
android·okhttp