I have a problem with facebook SDK version 4.0.0
->
I am trying to set up two different flavors of my app - staging and production.
Everything works as fine as expected but I get INSTALL_FAILED_CONFLICTING_PROVIDER
error when trying to install one app if another is already on the device.
I researched it, tried a couple of solutions but unfortunately as this is a 3rd party provider I achieved nothing.
Maybe someone encountered a similar problem and found a solution? I'll be glad for any help, links, documentations etc.
Here is how I define provider in manifests, it's exactly how facebook documentation tells this should be done
<provider android:authorities="com.facebook.app.FacebookContentProvider{staging or production fb app id depending on flavour}"
android:name="com.facebook.FacebookContentProvider"
android:exported="true" />
You need to create two separate facebook account app id because I think you have set two different package names for your app for staging and production.
Ex. Staging app package name:com.example.app1
Production app package name:com.example.app2
So you can not use same facebook app Id for both this versions.
I'm facing the exact same problem. This is because provider authorities needs to be unique. Try uninstalling your app from the device first (all flavours), it works for me. It looks like the two flavours cannot co-exist with the same contentprovider authority and/or package name, so if it doesn't work you could try changing one of those. Otherwise maybe you'll just have to use 2 different facebook app ids.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With