java.lang.RuntimeException: An error occured while executing doInBackground()

This is probably because you’re trying to display something on doInBackground(). doInBackground runs in a worker thread which cannot do any UI work (including showing Toasts, which is what you’re doing). Instead, all UI work should be done on onPostExecute().

Leave a Comment