完成AsyncTask的后onPostExecute不叫不叫、AsyncTask、onPostExecute

由网友(打小就帅)分享简介:出于某种原因,我的 onPostExecute()后,我的的AsyncTask 完成不叫。For some reason my onPostExecute() is not called after my AsyncTask finishes.我的类decleration:My class decleration...

出于某种原因,我的 onPostExecute()后,我的的AsyncTask 完成不叫。

For some reason my onPostExecute() is not called after my AsyncTask finishes.

我的类decleration:

My class decleration:

公共类setWallpaperForeground扩展的AsyncTask<字符串,整数,布尔>

我onPostExecute():

My onPostExecute():

保护无效onPostExecute(布尔结果)

一切工作正常,我的 doInBackground()成功完成,并返回一个布尔但它只是结束。

Everything works fine, my doInBackground() completes successfully and returns a Boolean but then it just finishes.

感谢

推荐答案

你创建的AsyncTask在UI线程?同时您onPostExecute()方法中添加一个@Override annotaiton,以确保正确声明的。

Did you create your AsyncTask on the UI thread? Also add an @Override annotaiton on your onPostExecute() method to make sure you declared it correctly.

阅读全文

相关推荐

最新文章