java.lang.RuntimeException

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

Samebug tips1

We couldn't find tips for this exception.

Don't give up yet. Paste your full stack trace to get a solution.

Solutions on the web398

Stack trace

  • java.lang.RuntimeException: Can't create handler inside thread that has not called Looper.prepare() at android.os.Handler.<init>(Handler.java:197) at android.os.Handler.<init>(Handler.java:111) at android.app.Dialog.<init>(Dialog.java:111) at android.app.AlertDialog.<init>(AlertDialog.java:114) at android.app.AlertDialog$Builder.create(AlertDialog.java:931) at ir.blog.trafik.BackGround.onPreExecute(BackGround.java:88) at android.os.AsyncTask.executeOnExecutor(AsyncTask.java:586) at android.os.AsyncTask.execute(AsyncTask.java:534) at ir.blog.trafik.locationService.json_maker(locationService.java:538) at ir.blog.trafik.locationService$1.run(locationService.java:588) at java.util.Timer$TimerImpl.run(Timer.java:284)

Write tip

You have a different solution? A short tip here would help you and many other users who saw this issue last week.

Users with the same issue

gamebusterzgamebusterz
Once,
Unknown visitor
Unknown visitorOnce,
bayukresnobayukresno
9 times, last one
Unknown visitor
Unknown visitorOnce,
Unknown visitor
Unknown visitorOnce,
35 more bugmates