我使用翻新从服务器获取数据,我使用带api 21的Redmi 3设备,它工作正常。 我在api> 21的某些模拟器中使用了它,它在第1行第60列显示了输入结束。 但是,如果我刷新,有时我没有收到该错误,如果再次刷新,有时我得到了该错误。 我能弄清楚问题,但我被卡住了。我确信我的json是正确的,因为有时它可以工作。
{"success":true,"result":{"data_array":[],"data_object":{}}}
这是t.printStackTrace()的错误
2019-01-22 11:48:17.335 10543-10543/id.iniaja.iniaja W/System.err: ja`enter code here`va.io.EOFException: End of input at line 1 column 60 path $.result
2019-01-22 11:48:17.335 10543-10543/id.iniaja.iniaja W/System.err: at com.google.gson.stream.JsonReader.nextNonWhitespace(JsonReader.java:1401)
2019-01-22 11:48:17.335 10543-10543/id.iniaja.iniaja W/System.err: at com.google.gson.stream.JsonReader.doPeek(JsonReader.java:482)
2019-01-22 11:48:17.335 10543-10543/id.iniaja.iniaja W/System.err: at com.google.gson.stream.JsonReader.hasNext(JsonReader.java:414)
2019-01-22 11:48:17.335 10543-10543/id.iniaja.iniaja W/System.err: at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$Adapter.read(ReflectiveTypeAdapterFactory.java:216)
2019-01-22 11:48:17.336 10543-10543/id.iniaja.iniaja W/System.err: at retrofit2.converter.gson.GsonResponseBodyConverter.convert(GsonResponseBodyConverter.java:39)
2019-01-22 11:48:17.336 10543-10543/id.iniaja.iniaja W/System.err: at retrofit2.converter.gson.GsonResponseBodyConverter.convert(GsonResponseBodyConverter.java:27)
2019-01-22 11:48:17.336 10543-10543/id.iniaja.iniaja W/System.err: at retrofit2.ServiceMethod.toResponse(ServiceMethod.java:122)
2019-01-22 11:48:17.336 10543-10543/id.iniaja.iniaja W/System.err: at retrofit2.OkHttpCall.parseResponse(OkHttpCall.java:217)
2019-01-22 11:48:17.336 10543-10543/id.iniaja.iniaja W/System.err: at retrofit2.OkHttpCall$1.onResponse(OkHttpCall.java:116)
2019-01-22 11:48:17.336 10543-10543/id.iniaja.iniaja W/System.err: at okhttp3.RealCall$AsyncCall.execute(RealCall.java:153)
2019-01-22 11:48:17.336 10543-10543/id.iniaja.iniaja W/System.err: at okhttp3.internal.NamedRunnable.run(NamedRunnable.java:32)
2019-01-22 11:48:17.336 10543-10543/id.iniaja.iniaja W/System.err: at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1162)
2019-01-22 11:48:17.336 10543-10543/id.iniaja.iniaja W/System.err: at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:636)
2019-01-22 11:48:17.336 10543-10543/id.iniaja.iniaja W/System.err: at java.lang.Thread.run(Thread.java:764)