Conflicting content providers facebook SDK
Asked Answered
T

2

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" />
Trigonometry answered 8/5, 2015 at 12:42 Comment(0)
P
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.

Psf answered 8/5, 2015 at 13:15 Comment(1)
Hello, I am not using the same facebook app id, I have two different apps in facebook console, and also I have different packages.Trigonometry
V
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.

Vibrant answered 28/7, 2015 at 14:16 Comment(2)
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 ;)Trigonometry
Yes, totally annoying.. although not the first time where I have conflicts with the facebook sdk.. it sucks :(Vibrant

© 2022 - 2024 — McMap. All rights reserved.