onPostExecute not called after completion AsyncTask

前端 未结 8 1741
[愿得一人]
[愿得一人] 2020-12-10 09:56

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

My class decleration:

public class setWallpaper

8条回答
  •  长情又很酷
    2020-12-10 10:45

    Found/Made another nasty mistake:

    If your params of onPostExecute(Param param) don't match the one you defined with extends AsyncTask<...,...,Param> and you didn't use the @Override annotation, it will never be executed and you don't get a warning from Eclipse.

    Note to myself: Just always use the @Override annotation and Eclipse will help you.

    Another easy way to avoid all named mistakes:

    in Eclipse: Right-click in code > Source > Override/Implement Methods

提交回复
热议问题