AsyncTask: doInBackground not called

后端 未结 3 993
旧巷少年郎
旧巷少年郎 2021-02-03 10:59

I have a problem with the AsyncTask. Sometimes the doInBackground() method is not called after onPreExecute().

I know this questio

3条回答
  •  甜味超标
    2021-02-03 11:29

    Your code looks fine.

    You can only run async tasks once. I'm guessing that you are trying to run them several times.

    Create another instance and try again.

    If it doesn't works, check the logcat and post it here if it's not enough for you to fix it.

提交回复
热议问题