java.lang.IllegalStateException: Main thread not allowed to quit.

Stack Overflow | Shiraaz.M | 7 months ago
tip
Your exception is missing from the Samebug knowledge base.
Here are the best solutions we found on the Internet.
Click on the to mark the helpful solution and get rewards for you help.
  1. 0

    How do you Manage a CountdownTimer from within an IntentService?

    Stack Overflow | 7 months ago | Shiraaz.M
    java.lang.IllegalStateException: Main thread not allowed to quit.
  2. 0

    Could not find a method saveData(View)

    Google Groups | 6 months ago | Giuseppe Guarino
    java.lang.IllegalStateException: Could not find a method saveData(View) in the activity class com.example.giuse.secondly.NewSheet for onClick handler on view class android.widget.Button with id 'button_save' at android.view.View$1.onClick(View.java:4007) at android.view.View.performClick(View.java:4780) at android.view.View$PerformClick.run(View.java:19866) at android.os.Handler.handleCallback(Handler.java:739) at android.os.Handler.dispatchMessage(Handler.java:95) at android.os.Looper.loop(Looper.java:135) at android.app.ActivityThread.main(ActivityThread.java:5254) at java.lang.reflect.Method.invoke(Native Method) at java.lang.reflect.Method.invoke(Method.java:372) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:903)

    Root Cause Analysis

    1. java.lang.IllegalStateException

      Main thread not allowed to quit.

      at android.os.MessageQueue.quit()
    2. Android Platform
      Looper.quit
      1. android.os.MessageQueue.quit(MessageQueue.java:415)
      2. android.os.Looper.quit(Looper.java:228)
      2 frames
    3. com.nursson.pomodorotimer
      PomodoroService$1.onFinish
      1. com.nursson.pomodorotimer.service.PomodoroService$1$override.onFinish(PomodoroService.java:44)
      2. com.nursson.pomodorotimer.service.PomodoroService$1$override.access$dispatch(PomodoroService.java)
      3. com.nursson.pomodorotimer.service.PomodoroService$1.onFinish(PomodoroService.java:0)
      3 frames
    4. Android Platform
      ActivityThread.main
      1. android.os.CountDownTimer$1.handleMessage(CountDownTimer.java:127)
      2. android.os.Handler.dispatchMessage(Handler.java:102)
      3. android.os.Looper.loop(Looper.java:148)
      4. android.app.ActivityThread.main(ActivityThread.java:5417)
      4 frames
    5. Java RT
      Method.invoke
      1. java.lang.reflect.Method.invoke(Native Method)
      1 frame
    6. Android
      ZygoteInit.main
      1. com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
      2. com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
      2 frames