Installation failed with message INSTALL_FAILED_CONFLICTING_PROVIDER无法安装

安装时提示:Installation failed with message INSTALL_FAILED_CONFLICTING_PROVIDER
Installation failed with message INSTALL_FAILED_CONFLICTING_PROVIDER无法安装_第1张图片

原因:调试的环境中已有一个同名的Provider存在
解决:

 <provider  android:name="android.support.v4.content.FileProvider" android:authorities="fileProvider" android:exported="false"/>

将android:authorities值修改。
建议:这里的值最好使用${applicationId}来引用你的包名,这样俭省以后修改包名后的改动。如:

android:authorities="${applicationId}.你自己Provide的名字"

你可能感兴趣的:(异常)