java.lang.RuntimeException: Can't create handler inside thread that has not called Looper.prepare()

Stack Overflow | Vinod Mathu | 2 weeks 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

    App crash at first run in second run it works fine

    Stack Overflow | 2 weeks ago | Vinod Mathu
    java.lang.RuntimeException: Can't create handler inside thread that has not called Looper.prepare()
  2. 0

    cant create handler app crashes on first launch

    Stack Overflow | 1 week ago | Grav Houzz
    java.lang.RuntimeException: Can't create handler inside thread that has not called Looper.prepare()
  3. 0

    FCM onTokenRefresh() Can't create handler inside thread that has not called Looper.prepare()

    Stack Overflow | 2 months ago | Achmad Naufal Syafiq
    java.lang.RuntimeException: Can't create handler inside thread that has not called Looper.prepare()
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Error In Thread And not Showing my toast

    Stack Overflow | 2 years ago | ProgramingGeek
    java.lang.RuntimeException: Can't create handler inside thread that has not called Looper.prepare()
  6. 0

    Trying to call Toaster or Custom function inside setOnUtteranceProgressListener

    Stack Overflow | 2 months ago | 4naxr
    java.lang.RuntimeException: Can't create handler inside thread that has not called Looper.prepare()
Not finding the right solution?
Take a tour to get the most out of Samebug.

Tired of useless tips?

Automated exception search integrated into your IDE

Root Cause Analysis

  1. java.lang.RuntimeException

    Can't create handler inside thread that has not called Looper.prepare()

    at android.os.Handler.<init>()
  2. Android Platform
    Toast.makeText
    1. android.os.Handler.<init>(Handler.java:200)
    2. android.os.Handler.<init>(Handler.java:114)
    3. android.widget.Toast$TN$2.<init>(Toast.java:341)
    4. android.widget.Toast$TN.<init>(Toast.java:341)
    5. android.widget.Toast.<init>(Toast.java:103)
    6. android.widget.Toast.makeText(Toast.java:262)
    6 frames
  3. com.brommko.android
    MyFirebaseInstanceIDService.onTokenRefresh
    1. com.brommko.android.bankalerts.firebase.MyFirebaseInstanceIDService.sendRegistrationToServer(MyFirebaseInstanceIDService.java:46)
    2. com.brommko.android.bankalerts.firebase.MyFirebaseInstanceIDService.onTokenRefresh(MyFirebaseInstanceIDService.java:31)
    2 frames
  4. com.google.firebase
    zzb$2.run
    1. com.google.firebase.iid.FirebaseInstanceIdService.zza(Unknown Source)
    2. com.google.firebase.iid.FirebaseInstanceIdService.zzm(Unknown Source)
    3. com.google.firebase.iid.zzb$2.run(Unknown Source)
    3 frames
  5. Java RT
    Thread.run
    1. java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1133)
    2. java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:607)
    3. java.lang.Thread.run(Thread.java:761)
    3 frames