为了账号安全,请及时绑定邮箱和手机立即绑定

java.lang.NullPointerException:at com.example.http_01.HttpJson$1.run(HttpJson.java:70)

03-30 01:03:07.694: I/dalvikvm(14127): threadid=3: reacting to signal 3

03-30 01:03:07.874: I/dalvikvm(14127): Wrote stack traces to '/data/anr/traces.txt'

03-30 01:03:08.024: I/System.out(14127): http://172.28.138.186:8080/web/JsonServerServlet

03-30 01:03:08.194: I/dalvikvm(14127): threadid=3: reacting to signal 3

03-30 01:03:08.254: I/System.out(14127): 200

03-30 01:03:08.254: I/System.out(14127): java.io.BufferedReader@4103f330

03-30 01:03:08.264: I/dalvikvm(14127): Wrote stack traces to '/data/anr/traces.txt'

03-30 01:03:08.294: W/System.err(14127): org.json.JSONException: No value for schoolInfos

03-30 01:03:08.354: W/System.err(14127): at org.json.JSONObject.get(JSONObject.java:354)

03-30 01:03:08.354: W/System.err(14127): at org.json.JSONObject.getJSONArray(JSONObject.java:544)

03-30 01:03:08.354: W/System.err(14127): at com.example.http_01.HttpJson.parseJson(HttpJson.java:105)

03-30 01:03:08.354: W/System.err(14127): at com.example.http_01.HttpJson.run(HttpJson.java:66)

03-30 01:03:08.385: D/gralloc_goldfish(14127): Emulator without GPU emulation detected.

03-30 01:03:08.494: D/AndroidRuntime(14127): Shutting down VM

03-30 01:03:08.494: W/dalvikvm(14127): threadid=1: thread exiting with uncaught exception (group=0x409c01f8)

03-30 01:03:08.564: E/AndroidRuntime(14127): FATAL EXCEPTION: main

03-30 01:03:08.564: E/AndroidRuntime(14127): java.lang.NullPointerException

03-30 01:03:08.564: E/AndroidRuntime(14127): at com.example.http_01.HttpJson$1.run(HttpJson.java:70)

03-30 01:03:08.564: E/AndroidRuntime(14127): at android.os.Handler.handleCallback(Handler.java:605)

03-30 01:03:08.564: E/AndroidRuntime(14127): at android.os.Handler.dispatchMessage(Handler.java:92)

03-30 01:03:08.564: E/AndroidRuntime(14127): at android.os.Looper.loop(Looper.java:137)

03-30 01:03:08.564: E/AndroidRuntime(14127): at android.app.ActivityThread.main(ActivityThread.java:4424)

03-30 01:03:08.564: E/AndroidRuntime(14127): at java.lang.reflect.Method.invokeNative(Native Method)

03-30 01:03:08.564: E/AndroidRuntime(14127): at java.lang.reflect.Method.invoke(Method.java:511)

03-30 01:03:08.564: E/AndroidRuntime(14127): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:784)

03-30 01:03:08.564: E/AndroidRuntime(14127): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551)

03-30 01:03:08.564: E/AndroidRuntime(14127): at dalvik.system.NativeStart.main(Native Method)

03-30 01:03:09.214: I/dalvikvm(14127): threadid=3: reacting to signal 3

03-30 01:03:09.234: I/dalvikvm(14127): Wrote stack traces to '/data/anr/traces.txt'

03-30 01:08:08.741: I/Process(14127): Sending signal. PID: 14127 SIG: 9

http://img1.sycdn.imooc.com//56fb2e79000163f206780129.jpg


正在回答

2 回答

70行出现空指针,不是adapter是空就是data是空,排查一下就知道了

0 回复 有任何疑惑可以回复我~

他是在数据库那边没提取到内容  这个的话 您要看看你对应的代码的  school  name age的字母大小写什么,和您j2ee服务器的json字母是否一样。

0 回复 有任何疑惑可以回复我~

举报

0/150
提交
取消
Android中的Http通信
  • 参与学习       64671    人
  • 解答问题       306    个

了解Android-http网络编程应用,常见忘了请求相关应用

进入课程

java.lang.NullPointerException:at com.example.http_01.HttpJson$1.run(HttpJson.java:70)

我要回答 关注问题
意见反馈 帮助中心 APP下载
官方微信