AsyncTask “Only the original thread that created a view hierarchy can touch its views.”

后端 未结 4 2046
情歌与酒
情歌与酒 2021-02-20 10:50

I try to modify the Spinner content across the AsyncTaks but I can\'t and the Logcat is wrote \"09-19 16:36:11.189: ERROR/ERROR THE(6078): Only the original thread that created

4条回答
  •  伪装坚强ぢ
    2021-02-20 11:27

    You are trying to access UI components (View) from a background thread in your case inside the doInBackground() method. You are not allowed to do that.

提交回复
热议问题