问题:

使用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>

FileProvider相关 Failed to find configured root that contains的更多相关文章

  1. Android FileProvider相关 Failed to find configured root that contains

    问题: 使用FileProvider构造SD卡中文件uri时异常 java.lang.IllegalArgumentException: Failed to find configured root ...

  2. Failed to find configured root that contains

    这个主要问题是在android系统下7.0 拍照时,Android提供FileProvider类来供应用之间共享数据. 出现这个问题多为xml文件 path 类型和代码中调用的类型不同导致的 以下为多 ...

  3. python开发环境软件包安装相关 failed with error code 1 in /tmp/pip-build-vn_f_e1n/psutil/

    指定源安装 pip install git+https://github.com/xxxxxx.git pip install -r requirements.txt -i https://mirro ...

  4. Cannot run CentOS 7 or RHEL 7 installer: “Failed to start Switch Root”

    这个问题是由于安装程序默认的LABEL对于你要安装的磁盘系统分区不匹配造成的 通过编辑引导参数来使安装程序运行 在选择安装选项之前,按‘e’添加相应的引导参数

  5. 为安卓项目添加FileProvider

    简单记录 android7.0开始出现FileProvider.从一个小白角度看需要注意这几点: Manifest.xml中添加provider节点 添加xml文件 模块的build.gradle中添 ...

  6. 应用中对APK进行安装

    权限 <uses-permission android:name="android.permission.REQUEST_INSTALL_PACKAGES"/> //允 ...

  7. FileUriExposedException_Android7.0适配

    一. FileUriExposedException的解决 问题 由于在Android7.0上,google使用了新的权限机制,所以导致在调用相机的时候,如果传递的URI为”file://”类型,的系 ...

  8. Android 解析包时出现问题 的解决方案(应用检查更新)

    问题描述我们在进行Android开发的时候,一般都会在应用里检测有没有更新,并且从网上下载最新的版本包,覆盖本地的旧版本.在我的项目中,出现了一个问题,就是当安装包下载到本地的时候,产生了" ...

  9. Ubuntu14.04安装ROOT集群

    之前尝试在CentOS7上部署ROOT集群,却发现无论是源码包安装,还是官方提供的二进制包,都缺少了关键的xproofd可执行文件,导致PoD不能运行.没有办法,只能尝试在其他OS上部署,这里我选择了 ...

随机推荐

  1. 搭建openstf平台的那些事

    最近老板建议秀下肌肉,搭建一个STF android 真机测试平台,记录一下坑. 1. stf 是node开发的,通过npm即可安静,依赖的数据库是rethinkdb, 如果搭配appium效果更佳, ...

  2. cout关闭输出缓冲,调试用

    cout.setf(std::ios::unitbuf);

  3. Eclipse调试多线程代码

    Eclipse调试多线程代码 标签: eclipse 调试 多线程 | 发表时间:2013-02-16 05:51 | 作者:czjuttsw 分享到: 出处:http://blog.csdn.net ...

  4. python笔记二

    一 运算符 1算术运算+ - * /  % ** //其中%为取余,**为取幂如2**10=1024    9//4=2 需要注意的是python2.7中如9/2=4 需要正确表示,则在开头添加 fr ...

  5. UVa 11100 - The Trip, 2007 难度: 0

    题目 https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&a ...

  6. Go used as value问题

    练习Go变参时遇到一个报错:used as value 代码如下: // 错误代码 func myfunc(arg ...int) { for _, n := range arg { fmt.Prin ...

  7. nginx搭建以及其配置文件

    nginx搭建: 参考link:https://blog.csdn.net/wxyjuly/article/details/79443432 nginx配置文件详解: 参考link:https://w ...

  8. 8.7 C++二进制文件读写操作

    参考:http://www.weixueyuan.net/view/6413.html 总结: 二进制文件的读写稍微麻烦一些,对二进制文件的读写同样需要打开文件和关闭文件,打开和关闭方式与文本文件相同 ...

  9. 用canvas画一个房子

    <!DOCTYPE html> <html> <head> <meta charset="utf-8"/> <script t ...

  10. api管理平台

    安装和介绍 安装要求:(centos安装环境) nodejs(7.6+) mongodb(2.6|+) 安装get和编译的工具 yum -y install wget make gcc gcc-c++ ...