FileProvider相关 Failed to find configured root that contains错误
2017-11-21 09:53
232 查看
问题:
java.lang.IllegalArgumentException: Failed to find configured root that contains /storage/**
at android.support.v4.content.FileProvider$SimplePathStrategy.getUriForFile(FileProvider.java:678)
at android.support.v4.content.FileProvider.getUriForFile(FileProvider.java:377)
这是在android6.0以上进行程序间文件共享使用FileProvider时出现的构造SD卡异常错误
解决方案:
在file_paths.xml文件中添加root-path 标签
<path>
<root-path name="root_path" path="."/>
</path>
就可以了
java.lang.IllegalArgumentException: Failed to find configured root that contains /storage/**
at android.support.v4.content.FileProvider$SimplePathStrategy.getUriForFile(FileProvider.java:678)
at android.support.v4.content.FileProvider.getUriForFile(FileProvider.java:377)
这是在android6.0以上进行程序间文件共享使用FileProvider时出现的构造SD卡异常错误
解决方案:
在file_paths.xml文件中添加root-path 标签
<path>
<root-path name="root_path" path="."/>
</path>
就可以了
相关文章推荐
- Android FileProvider相关 Failed to find configured root that contains
- sas输入输出数据的相关语句 output、 put、 remove、replace 、file 、infile
- 在与 SQL Server 建立连接时出现与网络相关的或特定于实例的错误。未找到或无法访问服务器。请验证实例名称是否正确并且 SQL Server 已配置为允许远程连接。 (provider: 命名管
- android7.0之后版本,FileProvider适配问题
- Android 7.0 行为变更 通过FileProvider在应用间共享文件吧
- File对象相关方法使用简单例子
- Android 7.0 FileProvider 的那些坑
- 使用struts相关组件上传附件(org.apache.commons.fileupload.*)上传附件--详解
- 4.php session vs cookie 和File操作相关
- FileProvider控件的使用
- 黑马程序员_Java基础_IO流(File类和properties类相关操作)
- 关于MP4 fileformat中 duration及timescale相关的几个地方
- Docker 安装 Redis 方法一、通过 Dockerfile 构建 创建Dockerfile 首先,创建目录redis,用于存放后面的相关东西。 runoob@runoob:~$ mkdir -
- Android中添加两个(多个)FileProvider节点问题
- RN项目报错“React/RCTBundleURLProvider.h” file not found
- Android7.0调用相机 FileProvider.getUriForFile 报空指针
- Linux 字符设备驱动结构(三)—— file、inode结构体及chardevs数组等相关知识解析
- InternetOpen\InternetOpenUrl\InternetReadFile 等相关Win32 网络API 使用详细说明
- 组件(button、CheckBox、RadioButton、ColorPicker)和DataProvider类以及setRendererStyle类的相关运用
- FileProvider文件共享