android - What does this error in my Logcat mean -
i having problem understand error in logcat,can me please how can fixed this.
04-06 08:17:54.738: e/androidruntime(4491): fatal exception: asynctask #1 04-06 08:17:54.738: e/androidruntime(4491): java.lang.runtimeexception: error occured while executing doinbackground() 04-06 08:17:54.738: e/androidruntime(4491): @ android.os.asynctask$3.done(asynctask.java:299) 04-06 08:17:54.738: e/androidruntime(4491): @ java.util.concurrent.futuretask.finishcompletion(futuretask.java:352) 04-06 08:17:54.738: e/androidruntime(4491): @ java.util.concurrent.futuretask.setexception(futuretask.java:219) 04-06 08:17:54.738: e/androidruntime(4491): @ java.util.concurrent.futuretask.run(futuretask.java:239) 04-06 08:17:54.738: e/androidruntime(4491): @ android.os.asynctask$serialexecutor$1.run(asynctask.java:230) 04-06 08:17:54.738: e/androidruntime(4491): @ java.util.concurrent.threadpoolexecutor.runworker(threadpoolexecutor.java:1080) 04-06 08:17:54.738: e/androidruntime(4491): @ java.util.concurrent.threadpoolexecutor$worker.run(threadpoolexecutor.java:573) 04-06 08:17:54.738: e/androidruntime(4491): @ java.lang.thread.run(thread.java:841) 04-06 08:17:54.738: e/androidruntime(4491): caused by: java.lang.nullpointerexception: println needs message 04-06 08:17:54.738: e/androidruntime(4491): @ android.util.log.println_native(native method) 04-06 08:17:54.738: e/androidruntime(4491): @ android.util.log.e(log.java:231) 04-06 08:17:54.738: e/androidruntime(4491): @ com.example.logintest.adduser$asscrountask.doinbackground(adduser.java:118) 04-06 08:17:54.738: e/androidruntime(4491): @ com.example.logintest.adduser$asscrountask.doinbackground(adduser.java:1) 04-06 08:17:54.738: e/androidruntime(4491): @ android.os.asynctask$2.call(asynctask.java:287) 04-06 08:17:54.738: e/androidruntime(4491): @ java.util.concurrent.futuretask.run(futuretask.java:234) 04-06 08:17:54.738: e/androidruntime(4491): ... 4 more
to report crashs logcat should use log.d/v/etc(tag, message, throwable)
not e.printstacktrace()
.
anyway, code crashs because e.getmessage()
null , log don't accept null
message.
so change line to
log.e("my_app_error!", "error!", e);
Comments
Post a Comment