13

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" />
bartol
  • 251
  • 1
  • 12

2 Answers2

3

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.

Jay Shah
  • 732
  • 4
  • 16
  • Hello, I am not using the same facebook app id, I have two different apps in facebook console, and also I have different packages. – bartol May 08 '15 at 13:45
1

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.

agustinaliagac
  • 829
  • 10
  • 24
  • Hey thanks for your comment, unfortunately i still did not solve it. It's really annoying, but for now the only solution is as you wrote, uninstalling the apps, although it makes me angry because the whole point of having flavours is to be able to build and ship as many different version of the app as wanted. Damn you FB ;) – bartol Aug 03 '15 at 11:36
  • Yes, totally annoying.. although not the first time where I have conflicts with the facebook sdk.. it sucks :( – agustinaliagac Aug 03 '15 at 13:11