2011-03-30 89 views
1
WARN/dalvikvm(4645): threadid=7: thread exiting with uncaught exception (group=0x4001d800) 
    ERROR/AndroidRuntime(4645): FATAL EXCEPTION: Timer-0 
    ERROR/AndroidRuntime(4645): java.lang.RuntimeException: Can't create handler inside thread that has not called Looper.prepare() 
    ERROR/AndroidRuntime(4645):  at android.os.Handler.<init>(Handler.java:121) 
    ERROR/AndroidRuntime(4645):  at android.widget.Toast.<init>(Toast.java:68) 
    ERROR/AndroidRuntime(4645):  at android.widget.Toast.makeText(Toast.java:231) 
    ERROR/AndroidRuntime(4645):  at com.example.Task.jokedescription$1.run(jokedescription.java:186) 
    ERROR/AndroidRuntime(4645):  at java.util.Timer$TimerImpl.run(Timer.java:289) 
    WARN/ActivityManager(59): Force finishing activity com.example.Task/.jokedescription 
+0

解决此行代码也将是巨大的:在com.example.Task.jokedescription $ 1.run(jokedescription.java:186) – RoflcoptrException 2011-03-30 12:33:39

+0

对不起,我不能让你正确..什么是jokedescription.java:186 – RAAAAM 2011-03-30 12:36:44

+0

这应该是在你的代码中,你尝试显示一个敬酒。 – RoflcoptrException 2011-03-30 12:37:53

回答

5

您试图显示不是来自主(UI)线程的吐司。

请张贴的代码片断你有例外