安裝時提示:Installation failed with message INSTALL_FAILED_CONFLICTING_PROVIDER
原因:調試的環境中已有一個同名的Provider存在
解決:
<provider
android:name="android.support.v4.content.FileProvider"
android:authorities="fileProvider"
android:exported="false"/>
將android:authorities值修改。
建議:這裏的值最好使用${applicationId}來引用你的包名,這樣儉省以後修改包名後的改動。如:
android:authorities="${applicationId}.你自己Provide的名字"