java.lang.RuntimeException

An error occurred while executing doInBackground()

Samebug tips0

There are no available Samebug tips.

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

Solutions on the web190

Stack trace

  • java.lang.RuntimeException: An error occurred while executing doInBackground() at android.os.AsyncTask$3.done(AsyncTask.java:318) at java.util.concurrent.FutureTask.finishCompletion(FutureTask.java:354) at java.util.concurrent.FutureTask.setException(FutureTask.java:223) at java.util.concurrent.FutureTask.run(FutureTask.java:242) at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:243) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1133) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:607) at java.lang.Thread.run(Thread.java:761) Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'int java.lang.String.length()' on a null object reference at org.json.JSONTokener.nextCleanInternal(JSONTokener.java:116) at org.json.JSONTokener.nextValue(JSONTokener.java:94) at org.json.JSONObject.<init>(JSONObject.java:156) at org.json.JSONObject.<init>(JSONObject.java:173) at data.JSONWeatherParser.getWeather(JSONWeatherParser.java:23) at com.example.bartek.weather.MainActivity$WeatherTask.doInBackground(MainActivity>.java:67) at com.example.bartek.weather.MainActivity$WeatherTask.doInBackground(MainActivity>.java:60) at android.os.AsyncTask$2.call(AsyncTask.java:304) at java.util.concurrent.FutureTask.run(FutureTask.java:237) ... 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

SacchiSacchi
5 times, last one,
Hiren AmaliyarHiren Amaliyar
4 times, last one,
Unknown visitor
Unknown visitor1 times, last one,
filpgamefilpgame
1 times, last one,
gauravgaurav
38 times, last one,
29 more bugmates