java.lang.IllegalArgumentException: Failed to find configured root that contains /storage/emulated/0/Pictures

こ雲淡風輕ζ 提交于 2019-12-05 11:02:52

Change

<?xml version="1.0" encoding="utf-8"?>
<paths xmlns:android="http://schemas.android.com/apk/res/android">
    <external-path name="my_images" path="files/"/>
</paths>

to

<?xml version="1.0" encoding="utf-8"?>
<paths xmlns:android="http://schemas.android.com/apk/res/android">
    <external-path name="my_images" path="."/>
</paths>

as described in the link you shared above.

The provider below:

<?xml version="1.0" encoding="utf-8"?>
<paths xmlns:android="http://schemas.android.com/apk/res/android">
    <external-path name="my_images" path="files/"/>
</paths>

will address paths that look like

/storage/emulated/0/files/

but the paths that you are sharing

/storage/emulated/0/Pictures/Polfaced/IMG_20170203_155130.jpg

does not include or starts with:

/storage/emulated/0/files/

To understand what

path="."

does, read the link you shared in detail.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!