我正在尝试下载此文件
http://freetamilebooks.com/download/%e0%ae%87%e0%ae%9f-%e0%ae%92%e0%ae%a4%e0%af%81%e0%ae%95%e0%af%8d%e0%ae%95%e0%af%80%e0%ae%9f%e0%af%81-%e0%ae%89%e0%ae%b0%e0%ae%bf%e0%ae%ae%e0%af%88-epub/
始终获取IllegalArgumentException。不知道原因。使用以下代码段。相同的代码可用于其他文件网址。
val fetchConfiguration = FetchConfiguration.Builder(this)
.setDownloadConcurrentLimit(3)
.build()
fetch = Fetch.getInstance(fetchConfiguration)
val url = "https://www.engineerhammad.com/2015/04/Download-Test-Files.html"
val file = getExternalFilesDir(Environment.DIRECTORY_DOWNLOADS)?.absolutePath + "/Test.html"
val request = Request(url, file)
request.priority = Priority.HIGH
request.networkType = NetworkType.ALL
fetch.enqueue(request)