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

后端 未结 4 632
[愿得一人]
[愿得一人] 2020-12-03 21:27

Sometimes i get this crash error in my app

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

This is the full l

4条回答
  •  执念已碎
    2020-12-03 22:20

    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().

提交回复
热议问题