INSTALL_FAILED_CONFLICTING_PROVIDER



I've got installation error message and it makes me stuck half-day. The issues is Facebook App ID conflicted with existing app. (Means that I already have same App ID my android device. Share with other guy to escape of this issue if you met.


The Error Message as like below.


Installation failed with message INSTALL_FAILED_CONFLICTING_PROVIDER.

It is possible that this issue is resolved by uninstalling an existing version of the apk if it is present, and then re-installing.


WARNING: Uninstalling will remove the application data!


Do you want to uninstall the existing application?






The solution is simple.

Facebook_app_id is stored in my values.xml as like below.

<resources>
<string name="facebook_app_id">00000000000000</string>
</resources>


Then, to use facebook in app, required two modification.

One is Meta-data, orther is provider.

In my case I've forgot to modify FacebookContentProvider. FacebookContentProvider must have same Id "facebook_app_id".


AndroidManifest.xml

<meta-data
android:name="com.facebook.sdk.ApplicationId"
android:value="@string/facebook_app_id" />
<provider
android:name="com.facebook.FacebookContentProvider"
android:authorities="com.facebook.app.FacebookContentProvider00000000000000"
android:exported="true" />

Change FacebookContentProvider id which is red marked.



By doing this, issue will be gone.