Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
它很丑陋,但它似乎对我有用(我不知道它会产生什么后果):
DocumentFile df = DocumentFile.fromTreeUri(getApplicationContext(),Uri.parse(uri.toString().replace("/document/", "/tree/")))
没什么好抱怨的!!我什至可以做到df.listFiles()(这就是我一直想要的!)
df.listFiles()
编辑:抱怨 Nº1:需要该文件夹的持久 uri 权限