问题:

使用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. BNUOJ 33898 Cannon

    Cannon Time Limit: 1000ms Memory Limit: 65535KB This problem will be judged on HDU. Original ID: 449 ...

  2. [luoguP1901] 发射站(单调栈)

    传送门 呵呵 ——代码 #include <cstdio> #include <iostream> #define N 1000010 #define LL long long ...

  3. HDU——1133 Buy the Ticket

    Buy the Ticket Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others) T ...

  4. 美河LINUX 内核学习视频

    Linux内核从原理到代码详解 培训视频 Linux内核源码研读与实战演练 [7.10][美河资料发布小组@aipepsi][linux内核分析视频教程] 炼数成金Linux内核探秘 [11.23][ ...

  5. spring项目启动需要的几个注解

    1.@ComponentScan注解,spring context包下,可以理解嘛,扫描srping bean放在ioc容器中的. ApplicationContext是接口,就是IOC容器嘛,也在这 ...

  6. C语言实现strcmp()和strcpy()函数

    #include <stdio.h> #include <assert.h> char *strcpy(char *strDest, const char *strScr) { ...

  7. 【CV论文阅读】YOLO:Unified, Real-Time Object Detection

    YOLO的一大特点就是快,在处理上可以达到完全的实时.原因在于它整个检测方法非常的简洁,使用回归的方法,直接在原图上进行目标检测与定位. 多任务检测: 网络把目标检测与定位统一到一个深度网络中,而且可 ...

  8. [Vue @Component] Dynamic Vue.js Components with the component element

    You can dynamically switch between components in a template by using the reserved <component>  ...

  9. 小米2S 小米手机如何手动升级到开发版

    1 从官网下载系统的更新包,比如对于小米2S,从下面的网址下载. http://www.miui.com/download-2.html     2 下载完成之后,放到手机的任意文件夹下,比如下面的S ...

  10. 已知目标qps跟并发用户数20,压测平均响应时间实例

    Jmeter性能测试案例(一) 转:https://blog.csdn.net/lovesoo/article/details/78579547 测试需求:测试20个用户访问网站在负载达到30QPS时 ...