如何解决致命异常

RAA*_*AAM 1 android

    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
Run Code Online (Sandbox Code Playgroud)

Max*_*xim 5

您试图显示Toast而不是主(UI)线程.

请发布您有异常的代码片段.