Dror
Dror

Reputation: 2588

Unity: Facebook SDK and Firebase/AdMob SDK seems to be in conflict

Ever since I tried to integrate Facebook SDK into my Unity game which already had Firebase and AdMob integrated, I keep on getting odd exceptions, that annoyingly happen only when the build is about to finish.

Here's one

Execution failed for task ':launcher:checkReleaseDuplicateClasses'.
> 1 exception was raised by workers:
  java.lang.RuntimeException: Duplicate class kotlin.ArrayIntrinsicsKt found in modules jetified-app-1.8.7-unity-support-runtime.jar (:app-1.8.7-unity-support:) and jetified-org.jetbrains.kotlin.kotlin-stdlib-1.5.10.jar (org.jetbrains.kotlin.kotlin-stdlib-1.5.10.jar)
  Duplicate class kotlin.BuilderInference found in modules jetified-app-1.8.7-unity-support-runtime.jar (:app-1.8.7-unity-support:) and jetified-org.jetbrains.kotlin.kotlin-stdlib-1.5.10.jar (org.jetbrains.kotlin.kotlin-stdlib-1.5.10.jar)
  Duplicate class kotlin.DeepRecursiveFunction found in modules jetified-app-1.8.7-unity-support-runtime.jar (:app-1.8.7-unity-support:) and jetified-org.jetbrains.kotlin.kotlin-stdlib-1.5.10.jar (org.jetbrains.kotlin.kotlin-stdlib-1.5.10.jar)
  Duplicate class kotlin.DeepRecursiveKt found in modules jetified-app-1.8.7-unity-support-runtime.jar (:app-1.8.7-unity-support:) and jetified-org.jetbrains.kotlin.kotlin-stdlib-1.5.10.jar

Now if I delete org.jetbrains.kotlin.kotlin-stdlib-1.5.10.jar, the build seem to be running fine, but upon the next build the file is recreated and then again the build fails and I have to redelete the file.

Looking online, people seem to offer all kind of odd methods such as building on Android Studio, adding some weird lines to gradle config files, doing the rain dance, etc.

Example 1 Example 2

This totally seems like a 90s DLL hell scenario and I wonder if there really isn't just any better solution.

Thank you!

Upvotes: 0

Views: 403

Answers (0)

Related Questions