java.lang.RuntimeException

An error occured while executing doInBackground()

Samebug tips1

Any worker thread runs in background, since it is not intended to loop, is not connected to a Looper.for example doInBackground(). its implementation returns will be passed to onPostExecute() which runs on the UI thread.

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

Solutions on the web18678

  • via Coderanch by Gabriela Cristian, 6 months ago
    An error occured while executing doInBackground()
  • via Coderanch by himani mittal, 6 months ago
    An error occured while executing doInBackground()
  • via Coderanch by maulidan abdillah, 6 months ago
    An error occured while executing doInBackground()
  • Stack trace

    • java.lang.RuntimeException: An error occured while executing doInBackground() at android.os.AsyncTask$3.done(AsyncTask.java:200) at java.util.concurrent.FutureTask$Sync.innerSetException(FutureTask.java:234) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:258) at java.util.concurrent.FutureTask.run(FutureTask.java:122) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:648) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:673) at java.lang.Thread.run(Thread.java:1060) Caused by: java.lang.RuntimeException: Can't create handler inside thread that has not called Looper.prepare() at android.os.Handler.<init>(Handler.java:121) at android.location.LocationManager$ListenerTransport$1.<init>(LocationManager.java:128) at android.location.LocationManager$ListenerTransport.<init>(LocationManager.java:126) at android.location.LocationManager._requestLocationUpdates(LocationManager.java:697) at android.location.LocationManager.requestLocationUpdates(LocationManager.java:619) at com.WasserSportLotse.WasserSportLotse$LocationControl.doInBackground(WasserSportLotse.java:62) at com.WasserSportLotse.WasserSportLotse$LocationControl.doInBackground(WasserSportLotse.java:1) at android.os.AsyncTask$2.call(AsyncTask.java:185) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:256) ... 4 more

    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

    Unknown user
    Once, 1 year ago
    27 times, 1 week ago
    288 times, 1 month ago
    128 times, 4 months ago
    11 times, 5 months ago
    35 more bugmates