问题:

使用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的更多相关文章

  1. 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. linux&android PPP 相关知识

    Linux&Android PPP相关FAQ   目录 Linux&Android PPP相关FAQ.. 1 一.         文档说明... 3 二.         常见调试技 ...

  4. I.MX6 Android iperf3 porting failed

    /***************************************************************************** * I.MX6 Android iperf ...

  5. Nexus 5 Android 6.0.1刷机、Root

    Nexus 5 Android 6.0.1刷机.Root 2016-01-24   一.     准备 1.      备份通讯录等数据,切记. 2.      准备adb .fastboot.网上搜 ...

  6. android DDMS 连接真机(己ROOT),用file explore看不到data/data文件夹的解决办法

    android DDMS 连接真机(己ROOT),用file explore看不到data/data文件夹的解决办法 问题是没有权限,用360手机助手或豌豆荚也是看不见的. 简单的办法是用RE文件管理 ...

  7. android 技术相关Blog

    android 技术相关 LVXIANGAN的专栏 http://blog.csdn.net/LVXIANGAN/article/category/1101038 Android NFC 开发实例 h ...

  8. Android Studio相关的坑

    html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,bi ...

  9. Android resource compilation failed

    报错:Android resource compilation failed D:\android\EasySports\app\build\intermediates\incremental\mer ...

随机推荐

  1. RMQ 模板一份

    ;i<n;i++) d[i][]=A[i]; ;(<<j)<=n;j++) ;i+(<<j)-<n;i++) ],d[i+(<<(j-))][j- ...

  2. Uva10305 Ordering Tasks

    John有n个任务,但是有些任务需要在做完另外一些任务后才能做. 输入 输入有多组数据,每组数据第一行有两个整数1 <= n <= 100 和 m.n是任务个数(标记为1到n),m两个任务 ...

  3. N的倍数

    题目来源: Ural 1302 基准时间限制:1 秒 空间限制:131072 KB 分值: 40 难度:4级算法题 一个长度为N的数组A,从A中选出若干个数,使得这些数的和是N的倍数. 例如:N = ...

  4. Sql语句中关于如何在like '%?%'中给?赋值

    做模糊查询用户的时候,如果 String sql="select * from users where name like %?%"; String[] param={userna ...

  5. H3c 配置ssh acl

    http://www.h3c.com/cn/d_201108/723349_30005_0.htm

  6. 1010 过河卒 2002年NOIP全国联赛普及组codevs

    1010 过河卒  2002年NOIP全国联赛普及组codevs 题目描述 Description 如图,A 点有一个过河卒,需要走到目标 B 点.卒行走规则:可以向下.或者向右.同时在棋盘上的任一点 ...

  7. bzoj1072【SCOI2007】排列perm

    1072: [SCOI2007]排列perm Time Limit: 10 Sec  Memory Limit: 162 MB Submit: 1479  Solved: 928 [id=1072&q ...

  8. java中commons-beanutils的介绍

    1.   概述 commons-beanutil开源库是apache组织的一个基础的开源库.为apache中很多类提供工具方法.学习它是学习其它开源库实现的基础. Commons-beanutil中包 ...

  9. 小胖说事22-----iOS开发技巧之取消键盘响应和截屏功能

    1.UILable内容模糊 在非Retina的iPad mini 的屏幕上,一个UILable的frame的origin值假设是有小数位(如0.5),就会造成显示模糊,所以不妨用整数值的origin. ...

  10. JpGraph中文乱码问题解决

    JpGraph是一个PHP的图形类库,可以方便地生成各种柱状图,饼图,折线图等等,而且还可以方便地加文字.但是,中文的情况就稍微麻烦了一点.在JpGraph中默认是要把字符串转成utf8的,但是如果你 ...