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

相关推荐
whltaoin6 天前
Java 网络请求 Jar 包选型指南:从基础到实战
java·http·okhttp·网络请求·retrofit
华农第一蒟蒻7 天前
谈谈跨域问题
java·后端·nginx·安全·okhttp·c5全栈
一直向钱8 天前
android 基于okhttp的socket封装
android·okhttp
linuxxx1108 天前
ajax回调钩子的使用简介
okhttp
一直向钱9 天前
android 基于okhttp 封装一个websocket管理模块,方便开发和使用
android·websocket·okhttp
linuxxx11010 天前
ajax() 回调函数参数详解
前端·ajax·okhttp
linuxxx11013 天前
ajax与jQuery是什么关系?
ajax·okhttp·jquery
耀耀_很无聊14 天前
12_OkHttp初体验
okhttp
heeheeai14 天前
okhttp使用指南
okhttp·kotlin·教程
啦工作呢16 天前
ES6 promise-try-catch-模块化开发
android·okhttp