flutter_downloader下载继续失败
Flutter_downloader没有下载我的文件,这是我运行代码::的日志
DownloadWorker [url='https://tooxclusive.com/wp-content/uploads/2022/03/Asake-Sungba.mp3',filename=null,savedDir=/storage/emulated/0/Download,header=,isResume=false,status=1
D/DownloadWorker(25194): Update notification: [notificationId: 1, title: 'https://tooxclusive.com/wp-content/uploads/2022/03/Asake-Sungba.mp3', status: 2, progress: 0]
D/DownloadWorker(25194): Update too frequently!!!!, but it is the final update, we should sleep a second to ensure the update call can be processed
D/DownloadWorker(25194): Update notification:
[notificationId: 1, title: 'https://tooxclusive.com/wp-content/uploads/2022/03/Asake-Sungba.mp3', status: 4, progress: -1]
W/System.err(25194): java.net.MalformedURLException: no protocol: 'https://tooxclusive.com/wp-content/uploads/2022/03/Asake-Sungba.mp3'
W/System.err(25194): at java.net.URL.<init>(URL.java:590)
W/System.err(25194): at java.net.URL.<init>(URL.java:487)
W/System.err(25194): at java.net.URL.<init>(URL.java:436)
W/System.err(25194): at vn.hunghd.flutterdownloader.DownloadWorker.downloadFile(DownloadWorker.java:305)
W/System.err(25194): at vn.hunghd.flutterdownloader.DownloadWorker.doWork(DownloadWorker.java:235)
W/System.err(25194): at androidx.work.Worker$1.run(Worker.java:86)
W/System.err(25194): at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1162)
W/System.err(25194): at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:636)
W/System.err(25194): at java.lang.Thread.run(Thread.java:764)
I/WM-WorkerWrapper(25194): Worker result SUCCESS for Work [ id=52272908-105d-442c-a326-708c65c9a276, tags=
[ flutter_download_task, vn.hunghd.flutterdownloader.DownloadWorker ] ]
,这是代码::
await FlutterDownloader.enqueue(
url: _url, //url is https://tooxclusive.com/wp-content/uploads/2022/03/Asake-Sungba.mp3
savedDir: '/storage/emulated/0/Download',
showNotification: true,
saveInPublicStorage: true
);
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
做一件事。
Add two lines under
void main()
make DownloadClass as a Top-Level Function, Like Mentioned in the picture below.
Hope that will resolve your problem.
谢谢
do one thing.
Add two lines under
void main()
make DownloadClass as a Top-Level Function, Like Mentioned in the picture below.
Hope that will resolve your problem.
Thanks
工人表现出成功。请添加Internet,读和写入许可,因为您要访问下载文件夹
The worker shows success. Please add internet, read and write permission in manifest since you are accessing the download folder