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

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

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

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

猜你喜欢

转载自blog.csdn.net/weixin_44495678/article/details/117350056