AweiLoveAndroid / HttpRequestProcessor

网络请求隔离框架简单封装,有两种实现方式:一种是代理模式实现的,一种是工厂模式实现的。
Apache License 2.0
77 stars 16 forks source link

你的OK HTTPprocessor的代理运行报错怎么啊 #1

Open ChloeDimen opened 6 years ago

ChloeDimen commented 6 years ago

Process: com.lzw.httpprocessor, PID: 7849 com.google.gson.JsonSyntaxException: java.lang.IllegalStateException: Expected BEGIN_OBJECT but was STRING at line 1 column 1 path $ at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$Adapter.read(ReflectiveTypeAdapterFactory.java:224) at com.google.gson.Gson.fromJson(Gson.java:887) at com.google.gson.Gson.fromJson(Gson.java:852) at com.google.gson.Gson.fromJson(Gson.java:801) at com.google.gson.Gson.fromJson(Gson.java:773) at com.lzw.httpprocessor.http.HttpCallback.onSuccess(HttpCallback.java:20) at com.lzw.httpprocessor.processor.OkHttpProcessor$3.run(OkHttpProcessor.java:133) at android.os.Handler.handleCallback(Handler.java:743) at android.os.Handler.dispatchMessage(Handler.java:95) at android.os.Looper.loop(Looper.java:150) at android.app.ActivityThread.main(ActivityThread.java:5546) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:794) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:684) Caused by: java.lang.IllegalStateException: Expected BEGIN_OBJECT but was STRING at line 1 column 1 path $ at com.google.gson.stream.JsonReader.beginObject(JsonReader.java:385)

senjoeson commented 6 years ago

@ChloeDimen 这是因为你的gson解析出错了 不是框架的原因