Android FileProvider相关 Failed to find configured root that contains
2017-11-16 13:51
645 查看
问题:
使用FileProvider构造SD卡中文件uri时异常
java.lang.IllegalArgumentException: Failed to find configured root that contains /storage/840E-10F6/音乐/千里之外.mp3
at android.support.v4.content.FileProvider$SimplePathStrategy.getUriForFile(FileProvider.java:678)
at android.support.v4.content.FileProvider.getUriForFile(FileProvider.java:377)
解决方案:
provider_paths.xml 中增加 root-path 标签
使用FileProvider构造SD卡中文件uri时异常
java.lang.IllegalArgumentException: Failed to find configured root that contains /storage/840E-10F6/音乐/千里之外.mp3
at android.support.v4.content.FileProvider$SimplePathStrategy.getUriForFile(FileProvider.java:678)
at android.support.v4.content.FileProvider.getUriForFile(FileProvider.java:377)
解决方案:
provider_paths.xml 中增加 root-path 标签
<paths xmlns:android="http://schemas.android.com/apk/res/android"> <root-path name="root_path" path="." /> </paths>
相关文章推荐
- Android爬坑之旅之FileProvider(Failed to find configured root that contains)
- 【Android】【Other】FileProvider相关 Failed to find configured root that contains
- 【Android】【Other】FileProvider相关 Failed to find configured root that contains
- FileProvider 的使用(Failed to find configured root that contains/storage/emulated/0/DCIM/ )
- FileProvider无法获取外置SD卡问题解决方案 | Failed to find configured root that contains(转)
- FileProvider无法获取外置SD卡问题解决方案 | Failed to find configured root that contains
- 【Android】【Other】FileProvider相关 Failed to find configured root that contains
- 【Android】【Other】FileProvider相关 Failed to find configured root that contains
- FileProvider Failed to find configured root that contains
- 【Android】【Other】FileProvider相关 Failed to find configured root that contains
- 【Android】【Other】FileProvider相关 Failed to find configured root that contains
- 【Android】【Other】FileProvider相关 Failed to find configured root that contains
- 【Android】【Other】FileProvider相关 Failed to find configured root that contains
- 【Android】【Other】FileProvider相关 Failed to find configured root that contains
- FileProvider无法获取外置SD卡问题解决方案 | Failed to find configured root that contains
- Android - Failed to find provider info for com.google.settings in MapView Example
- android ContentProvider 遭遇 failed to find provider info
- android.os.NetworkOnMainThreadException,Failed to find provider info for com.android.inputmethod.lat
- Android 快捷方式的创建与查询 快捷方式问题大全 获取快捷方式在Launcher数据库中的信息 Failed to find provider info for com.android.la
- android: failed to find provider info for downloads