android - 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
- 获取
DOWNLOAD_COMPLETE
状态为 的广播HTTP_DATA_ERROR
。 - 当 Internet 关闭并最终获取 DownloadStatus Failed 时,获取 DownloadStatus 暂停。
有没有办法恢复失败的下载DownloadManager
?
解决方案
推荐阅读
- apache-spark - Spark - EMR - GlueCatalog:DataFrameWriter.bucketBy() 失败并出现 UnknownHostException
- c# - 将 .Net Core 2.2 Web 部署到 NGINX Centos 7 失败
- php - 将值添加到数组中以获得新值
- java - Java缓存系统(JCS)中的打印空值
- visual-studio - 我无法在文件后面获取 specflow 的代码以重新生成
- html - 如何在 HTML5 表格中设置列宽,第一行 colSpan > 1
- github - 有没有办法保留 Gist 设置 - 空格与制表符,换行与不换行?如何?
- fonts - MobaXterm V12 下 X11 应用程序中的默认字体大小
- regex-lookarounds - 正则表达式否定后视忽略注释命中
- javascript - 如何在猫头鹰轮播中单击按钮时自动播放 iframe 视频