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.
我想打开一个我写的复制到我的cacheDir的文件(例如音频文件或图像),但似乎其他应用程序没有对该目录的权限。这很合理(我的逻辑告诉我只有 root 和应用程序可以访问这个文件夹),但是这个问题有什么解决方法吗?
好吧,这很明显,我的朋友,使用 activity.getExternalCacheDir() 获取 SD 卡上的缓存目录。只是不要忘记设置权限。