I’m having problems with my company because I can’t get the Facebook SDK installed in Unity. Google requires a new SDK version and I’ve had to upgrade all the games without the Facebook SDK. I’ve had to stop player acquisition through this channel and revenues have collapsed as a result.
What’s strange about this is that I can install the SDK in a new project and it works.
But when I try to install it in games I’ve made over the years (started with older Unity versions and upgraded to newer ones), it doesn’t work. I’ve tried all sorts of things and I don’t know what to do anymore.
Could someone help?
I’m using Unity 2022.3.50f LTS
Facebook SDK is the latest 17.0.1
I can build the game to target SDK 35 just fine. When I add the Facebook SDK, it breaks unless I install it to a new project.
You should check the console for the full error, as the dialog suggests.
The error can be a bit hard to locate for Android builds in all the Gradle messages but it’s clear something is duplicated in your project and you need to figure out what exactly. The error should at least give you a clue.
Then you probably need to remove the old libraries from your project. What and how exactly depends on your project and it’s not possible to give any general advice.
Hi Adrian, I had all the errors and logs in this thread, but nobody cared.
This happened to every game I’ve made (about 10 games), also when I started a new project with only the Facebook SDK. I even installed Windows (and everything) from scratch to solve it. Nothing worked. Facebook SDK always broke the build and I’m sure it still does.
But after I installed ironSource LevelPlay to my games and then the Facebook SDK, it was solved.
It could be because I added this to the following gradle property: android/gradle.properties
android.enableDexingArtifactTransform=false
In these instructions, it was advised to add that. Something here solved the duplicate issue.
With iOS everything worked so this is Android issue only.