问题:
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卡异常错误
解决方案:
在res/xml路径下创建file_paths.xml文件中添加root-path 标签
<path>
<root-path name="root_path" path="."/>
</path>
就可以了