EasyImage library:AndroidManifest.xml中的属性文件\提供程序\路径也出现在[com.github.jkwiecien:EasyImage]中

EasyImage library:AndroidManifest.xml中的属性文件\提供程序\路径也出现在[com.github.jkwiecien:EasyImage]中,android,android-fileprovider,easyimage,Android,Android Fileprovider,Easyimage,我正在使用来自的EasyImage库 我在我的AndroidManifest.xml中有这个: <provider android:name="`" android:authorities="${applicationId}.fileprovider" android:exported="false" android:grantUriPermissions="true"> <meta-data android:name="

我正在使用来自的EasyImage库

我在我的
AndroidManifest.xml
中有这个:

<provider
    android:name="`"
    android:authorities="${applicationId}.fileprovider"
    android:exported="false"
    android:grantUriPermissions="true">
    <meta-data
        android:name="android.support.FILE_PROVIDER_PATHS"
        android:resource="@xml/file_paths" />
</provider>

编译时出现此渐变错误:

/home/babken/.../AndroidManifest.xml:216:13-64 Error:
Attribute provider#android.support.v4.content.FileProvider@authorities value=(com...fileprovider) from AndroidManifest.xml:216:13-64
is also present at [com.github.jkwiecien:EasyImage:1.3.1] AndroidManifest.xml:14:13-80 value=(com...easyphotopicker.fileprovider).
Suggestion: add 'tools:replace="android:authorities"' to <provider> element at AndroidManifest.xml:214:9-222:20 to override.
/home/babken/.../AndroidManifest.xml:221:17-51 Error:
Attribute meta-data#android.support.FILE_PROVIDER_PATHS@resource value=(@xml/file_paths) from AndroidManifest.xml:221:17-51
is also present at [com.github.jkwiecien:EasyImage:1.3.1] AndroidManifest.xml:19:17-50 value=(@xml/filepaths).
Suggestion: add 'tools:replace="android:resource"' to <meta-data> element at AndroidManifest.xml:219:13-221:54 to override.
/home/babken/../AndroidManifest.xml:216:13-64错误:
属性提供程序#android.support.v4.content。FileProvider@authorities值=(com…fileprovider)来自AndroidManifest.xml:216:13-64
也存在于[com.github.jkwiecien:EasyImage:1.3.1]AndroidManifest.xml:14:13-80 value=(com…easyphotopicker.fileprovider)。
建议:在AndroidManifest.xml:214:9-222:20处的元素中添加“tools:replace=“android:authorities””以覆盖。
/home/babken/../AndroidManifest.xml:221:17-51错误:
属性元数据#android.support.FILE_提供程序_PATHS@resource值=(@xml/file_路径)来自AndroidManifest.xml:221:17-51
也出现在[com.github.jkwiecien:EasyImage:1.3.1]AndroidManifest.xml:19:17-50 value=(@xml/filepath)。
建议:在AndroidManifest.xml:219:13-221:54处的元素中添加'tools:replace=“android:resource”'以覆盖。

解决方案是使用自定义类扩展android.support.v4.content.FileProvider,并改用它:

package com....utils;

import android.support.v4.content.FileProvider;


public class CustomFileProvider extends FileProvider {
}
并在清单中使用它:

<provider
    android:name=".utils.CustomFileProvider"
    android:authorities="${applicationId}.fileprovider"
    android:exported="false"
    android:grantUriPermissions="true">
    <meta-data
        android:name="android.support.FILE_PROVIDER_PATHS"
        android:resource="@xml/file_paths" />
</provider>

android:resource=“@xml/file\u路径”/>
是否需要其他xml文件?