首页 > 解决方案 > Android 下载管理器:在 HTTP_DATA_ERROR 失败后下载不会恢复

问题描述

当互联网关闭时,我看到 AndroidDownloadManager正在重试 5 次,在第 5 次尝试中显示HTTP_DATA_ERROR. 在此之后,即使 Internet 已打开,下载也不会恢复。

以下是日志:

Line 2009: 10-09 12:27:26.795  2342  5380 D DownloadManager: [1701] Starting
Line 9895: 10-09 12:27:52.417  2342  5380 W DownloadManager: [1701] Stop requested with status HTTP_DATA_ERROR: Failed reading response: java.net.SocketTimeoutException: timeout
Line 9896: 10-09 12:27:52.419  2342  5380 D DownloadManager: [1701] Finished with status WAITING_TO_RETRY
Line 20736: 10-09 12:28:26.518  2342  5438 D DownloadManager: [1701] Starting
Line 20786: 10-09 12:28:26.646  2342  5438 W DownloadManager: [1701] Stop requested with status HTTP_DATA_ERROR: Unable to resolve host "c62d02045ba67b9fbb22ceb4bb32701f.cache.sko.fm": No address associated with hostname
Line 20787: 10-09 12:28:26.647  2342  5438 D DownloadManager: [1701] Finished with status WAITING_TO_RETRY
Line 45582: 10-09 12:29:45.793  2342  5478 D DownloadManager: [1701] Starting
Line 45742: 10-09 12:29:46.272  2342  5478 W DownloadManager: [1701] Stop requested with status HTTP_DATA_ERROR: Unable to resolve host "XXXXXXXX": No address associated with hostname
Line 45743: 10-09 12:29:46.273  2342  5478 D DownloadManager: [1701] Finished with status WAITING_TO_RETRY
Line 99591: 10-09 12:32:26.267  2342  5559 W DownloadManager: [1701] Stop requested with status HTTP_DATA_ERROR: Unable to resolve host "XXXXXXXX": No address associated with hostname
Line 99592: 10-09 12:32:26.269  2342  5559 D DownloadManager: [1701] Finished with status WAITING_TO_RETRY
Line 216529: 10-09 12:38:12.467  2342  5731 D DownloadManager: [1701] Starting
Line 216567: 10-09 12:38:12.586  2342  5731 W DownloadManager: [1701] Stop requested with status HTTP_DATA_ERROR: Unable to resolve host "XXXXXXXX": No address associated with hostname
Line 216568: 10-09 12:38:12.587  2342  5731 D DownloadManager: [1701] Finished with status HTTP_DATA_ERROR

有没有办法恢复失败的下载DownloadManager

标签: androidandroid-download-manager

解决方案


推荐阅读