我已经在任务完成背景通过的AsyncTask。在某些时候,我需要发出吐司的东西完成。

我试过,我失败了,因为 Caused by: java.lang.RuntimeException: Can't create handler inside thread that has not called Looper.prepare()

我怎么能这样做?

有帮助吗?

解决方案

onPostExecute - 对UI线程执行 要么  publishProgress();在doinbackground和

protected void onProgressUpdate(Integer... progress) {
}

http://developer.android.com/reference/android/os/ AsyncTask.html

scroll top