Cannot execute task: the task has already been executed....

我不是女神ヾ 2022-10-16 07:37 150阅读 0赞

遇到如下异常是因为AsyncTask线程只能运行一次,而你当前却在多次运行某个AsyncTask线程

  1. Cannot execute task: the task has already been executed (a task can be executed only once)....

在这里插入图片描述
解决方法:
将”task.execute(…) “换成“ new AsyncTask().execute(…)”; 你的task只能execute(…)一次,所以每次要更新的时候都是新建task去更新就好了。
问题解决,已测试验证!!!

发表评论

表情:
评论列表 (有 0 条评论,150人围观)

还没有评论,来说两句吧...

相关阅读