Trying to use AsyncTask do download some image files

倖福魔咒の 提交于 2019-12-02 11:16:52
Ted Hopp

Your AsyncTask is declared with a param type of URL, but you're trying to pass String (or ArrayList) objects. Either prepare an Array of URL objects in the calling program or modify DownloadFiles to accept String instead of URL parameters and convert each String to a URL in the execute() method.

Better yet, since you are accessing FilesToDownload from within execute(), you don't need to pass anything to execute() and you could declare the first generic parameter of DownloadFiles as Void.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!