【发布时间】:2018-10-11 12:55:16
【问题描述】:
我正在尝试从应用程序的存储中检索图像。
我有一个在file:///data/user/0/com.myapp.android.debug/cache/cropped4227942271894219596.jpg 中存储图像的库。
我正在尝试通过执行以下操作来检索图像:
getUriForFile(context, context.applicationInfo.packageName + ".fileprovider", File(imageUri)) 但我得到的只是:
Failed to find configured root that contains /file:/data/user/0/com.myapp.android.debug/cache/cropped4227942271894219596.jpg
我的provider_paths.xml 是:
<paths>
<files-path
name="internal_files"
path="/cache" />
</paths>
有人知道问题可能是什么吗? 提前致谢!
【问题讨论】:
标签: android android-file android-fileprovider