smuyyh / ImageSelector

:foggy: Android 图片选择器。充分自由定制,极大程度简化使用,支持图库多选/图片预览/单选/照片裁剪/拍照/自定义图片加载方式/自定义色调/沉浸式状态栏
http://blog.csdn.net/yyh352091626/article/details/52154583
Apache License 2.0
1.6k stars 254 forks source link

FileProvider 报错,解决办法内详 #172

Closed llfnqt closed 4 years ago

llfnqt commented 4 years ago

步骤一:自定义provider_paths.xml,并放入xml文件夹中,xml内容如下:

<?xml version="1.0" encoding="utf-8"?>

步骤二:AndroidManifest.xm 里面声明加上如内容,直接复制即可:

    <provider
        android:name="android.support.v4.content.FileProvider"
        android:authorities="${applicationId}.fileProvider"
        android:exported="false"
        android:grantUriPermissions="true"
        tools:replace="android:authorities">
        <meta-data
            android:name="android.support.FILE_PROVIDER_PATHS"
            android:resource="@xml/provider_paths"
            tools:replace="android:resource"/>
    </provider>

搞定,希望能帮到大家

smuyyh commented 4 years ago

fixed