我有AsyncTask在后台完成的任务。在某些时候,我需要发出一个Toast来表示某事已完成。我尝试过但失败了,因为Causedby:java.lang.RuntimeException:Can'tcreatehandlerinsidethethreadthathasnotcalledLooper.prepare()我该怎么做? 最佳答案 onPostExecute-在UI线程上执行或者publishProgress();在你的doinbackground和protectedvoidonProgressUpdate(Integer.