Installation failed with message INSTALL_FAILED_CONFLICTING_PROVIDER無法安裝

安裝時提示: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的名字"
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章