android10DownFile icon indicating copy to clipboard operation
android10DownFile copied to clipboard

为什么请求Download路径Uri始终是null

Open oOtroyOo opened this issue 4 years ago • 8 comments

手机是一加7pro,安卓10。 compile和target api都填的29. 跟着贴子写的,就是拿不到地址 屏幕截图 2021-03-17 181948

oOtroyOo avatar Mar 17 '21 10:03 oOtroyOo

权限有给么?读写权限

CMzhizhe avatar Mar 17 '21 10:03 CMzhizhe

android.permission.WRITE_EXTERNAL_STORAGE android.permission.READ_EXTERNAL_STORAGE 都有的。也请求出来了的。

oOtroyOo avatar Mar 18 '21 01:03 oOtroyOo

你试试直接下载这个图片 https://p1.ssl.qhimgs1.com/sdr/400__/t01cc875187ff0ba8eb.jpg。我这边测试了一下,是可以的

CMzhizhe avatar Mar 18 '21 01:03 CMzhizhe

不是下载的问题,这几行就跟http毫无关系,就是请求本地存储路径

oOtroyOo avatar Mar 18 '21 01:03 oOtroyOo

http://hk.uwenku.com/question/p-edmehlmi-v.html https://www.icode9.com/content-4-256436.html https://www.it1352.com/138796.html https://www.orcode.com/question/1071357_k9e697.html 太气人了 。好不容易搜到相关问题。结果这几篇全部来自同一篇机翻问答的抄袭

oOtroyOo avatar Mar 18 '21 05:03 oOtroyOo

请问有解决吗?我也碰到insert的时候返回uri是null

dufangyu1990 avatar Oct 16 '23 02:10 dufangyu1990

邮箱已经收到

CMzhizhe avatar Oct 16 '23 02:10 CMzhizhe

请问有解决吗?我也碰到insert的时候返回uri是null 有没有可能你名称都相同了?考虑一下每次更换一次名称,用时间戳来测试。如果还是不行,考虑试试换个目录

CMzhizhe avatar Oct 16 '23 02:10 CMzhizhe