facebook / facebook-sdk-for-unity

The facebook sdk for unity.
https://developers.facebook.com/docs/unity
Other
493 stars 257 forks source link

Build failing due to duplicate classes, conflicting with Firebase SDK - Unity 2019.4.26 #570

Open Banjo16 opened 3 years ago

Banjo16 commented 3 years ago

Checklist

Environment

Describe your dev environment here, giving as many details as possible. If you have them, make sure to include:

Goals

Build Project

Expected Results

Project built build successfully

Actual Results

Project is failing to build during gradle:

FAILURE: Build failed with an exception. What went wrong: Execution failed for task ':launcher:checkDebugDuplicateClasses'. 1 exception was raised by workers: java.lang.RuntimeException: Duplicate class com.android.installreferrer.BuildConfig found in modules classes.jar (:installreferrer-1.0:) and classes.jar (com.android.installreferrer:installreferrer:1.0) Duplicate class com.android.installreferrer.api.InstallReferrerClient found in modules classes.jar (:installreferrer-1.0:) and classes.jar (com.android.installreferrer:installreferrer:1.0) Duplicate class com.android.installreferrer.api.InstallReferrerClient$1 found in modules classes.jar (:installreferrer-1.0:) and classes.jar (com.android.installreferrer:installreferrer:1.0) Duplicate class com.android.installreferrer.api.InstallReferrerClient$Builder found in modules classes.jar (:installreferrer-1.0:) and classes.jar (com.android.installreferrer:installreferrer:1.0) Duplicate class com.android.installreferrer.api.InstallReferrerClient$InstallReferrerResponse found in modules classes.jar (:installreferrer-1.0:) and classes.jar (com.android.installreferrer:installreferrer:1.0) Duplicate class com.android.installreferrer.api.InstallReferrerClientImpl found in modules classes.jar (:installreferrer-1.0:) and classes.jar (com.android.installreferrer:installreferrer:1.0) Duplicate class com.android.installreferrer.api.InstallReferrerClientImpl$1 found in modules classes.jar (:installreferrer-1.0:) and classes.jar (com.android.installreferrer:installreferrer:1.0) Duplicate class com.android.installreferrer.api.InstallReferrerClientImpl$ClientState found in modules classes.jar (:installreferrer-1.0:) and classes.jar (com.android.installreferrer:installreferrer:1.0) Duplicate class com.android.installreferrer.api.InstallReferrerClientImpl$InstallReferrerServiceConnection found in modules classes.jar (:installreferrer-1.0:) and classes.jar (com.android.installreferrer:installreferrer:1.0) Duplicate class com.android.installreferrer.api.InstallReferrerStateListener found in modules classes.jar (:installreferrer-1.0:) and classes.jar (com.android.installreferrer:installreferrer:1.0) Duplicate class com.android.installreferrer.api.ReferrerDetails found in modules classes.jar (:installreferrer-1.0:) and classes.jar (com.android.installreferrer:installreferrer:1.0) Duplicate class com.android.installreferrer.commons.InstallReferrerCommons found in modules classes.jar (:installreferrer-1.0:) and classes.jar (com.android.installreferrer:installreferrer:1.0) Duplicate class com.google.android.finsky.externalreferrer.IGetInstallReferrerService found in modules classes.jar (:installreferrer-1.0:) and classes.jar (com.android.installreferrer:installreferrer:1.0) Duplicate class com.google.android.finsky.externalreferrer.IGetInstallReferrerService$Stub found in modules classes.jar (:installreferrer-1.0:) and classes.jar (com.android.installreferrer:installreferrer:1.0) Duplicate class com.google.android.finsky.externalreferrer.IGetInstallReferrerService$Stub$Proxy found in modules classes.jar (:installreferrer-1.0:) and classes.jar (com.android.installreferrer:installreferrer:1.0) Duplicate class com.google.zxing.BarcodeFormat found in modules MIO_SDK_UNITY_1.3.9_10156.jar (:UnityChannel:) and core-3.3.3.jar (com.google.zxing:core:3.3.3) Duplicate class com.google.zxing.Binarizer found in modules MIO_SDK_UNITY_1.3.9_10156.jar (:UnityChannel:) and core-3.3.3.jar (com.google.zxing:core:3.3.3) Duplicate class com.google.zxing.BinaryBitmap found in modules MIO_SDK_UNITY_1.3.9_10156.jar (:UnityChannel:) and core-3.3.3.jar (com.google.zxing:core:3.3.3) Duplicate class com.google.zxing.ChecksumException found in modules MIO_SDK_UNITY_1.3.9_10156.jar (:UnityChannel:) and core-3.3.3.jar (com.google.zxing:core:3.3.3) Duplicate class com.google.zxing.DecodeHintType found in modules MIO_SDK_UNITY_1.3.9_10156.jar (:UnityChannel:) and core-3.3.3.jar (com.google.zxing:core:3.3.3) Duplicate class com.google.zxing.EncodeHintType found in modules MIO_SDK_UNITY_1.3.9_10156.jar (:UnityChannel:) and core-3.3.3.jar (com.google.zxing:core:3.3.3) Duplicate class com.google.zxing.FormatException found in modules MIO_SDK_UNITY_1.3.9_10156.jar (:UnityChannel:) and core-3.3.3.jar (com.google.zxing:core:3.3.3) Duplicate class com.google.zxing.LuminanceSource found in modules MIO_SDK_UNITY_1.3.9_10156.jar (:UnityChannel:) and core-3.3.3.jar (com.google.zxing:core:3.3.3) Duplicate class com.google.zxing.MultiFormatReader found in modules MIO_SDK_UNITY_1.3.9_10156.jar (:UnityChannel:) and core-3.3.3.jar (com.google.zxing:core:3.3.3) Duplicate class com.google.zxing.MultiFormatWriter found in modules MIO_SDK_UNITY_1.3.9_10156.jar (:UnityChannel:) and core-3.3.3.jar (com.google.zxing:core:3.3.3) Duplicate class com.google.zxing.MultiFormatWriter$1 found in modules MIO_SDK_UNITY_1.3.9_10156.jar (:UnityChannel:) and core-3.3.3.jar (com.google.zxing:core:3.3.3) Duplicate class com.google.zxing.NotFoundException found in modules MIO_SDK_UNITY_1.3.9_10156.jar (:UnityChannel:) and core-3.3.3.jar (com.google.zxing:core:3.3.3) Duplicate class com.google.zxing.PlanarYUVLuminanceSource found in modules MIO_SDK_UNITY_1.3.9_10156.jar (:UnityChannel:) and core-3.3.3.jar (com.google.zxing:core:3.3.3) Duplicate class com.google.zxing.RGBLuminanceSource found in modules MIO_SDK_UNITY_1.3.9_10156.jar (:UnityChannel:) and core-3.3.3.jar (com.google.zxing:core:3.3.3) Duplicate class com.google.zxing.Reader found in modules MIO_SDK_UNITY_1.3.9_10156.jar (:UnityChannel:) and core-3.3.3.jar (com.google.zxing:core:3.3.3) Duplicate class com.google.zxing.ReaderException found in modules MIO_SDK_UNITY_1.3.9_10156.jar (:UnityChannel:) and core-3.3.3.jar (com.google.zxing:core:3.3.3) Duplicate class com.google.zxing.Result found in modules MIO_SDK_UNITY_1.3.9_10156.jar (:UnityChannel:) and core-3.3.3.jar (com.google.zxing:core:3.3.3) Duplicate class com.google.zxing.ResultMetadataType found in modules MIO_SDK_UNITY_1.3.9_10156.jar (:UnityChannel:) and core-3.3.3.jar (com.google.zxing:core:3.3.3) Duplicate class com.google.zxing.ResultPoint found in modules MIO_SDK_UNITY_1.3.9_10156.jar (:UnityChannel:) and core-3.3.3.jar (com.google.zxing:core:3.3.3) Duplicate class com.google.zxing.ResultPointCallback found in modules MIO_SDK_UNITY_1.3.9_10156.jar (:UnityChannel:) and core-3.3.3.jar (com.google.zxing:core:3.3.3) Duplicate class com.google.zxing.Writer found in modules MIO_SDK_UNITY_1.3.9_10156.jar (:UnityChannel:) and core-3.3.3.jar (com.google.zxing:core:3.3.3) Duplicate class com.google.zxing.WriterException found in modules MIO_SDK_UNITY_1.3.9_10156.jar (:UnityChannel:) and core-3.3.3.jar (com.google.zxing:core:3.3.3) Duplicate class com.google.zxing.aztec.AztecDetectorResult found in modules MIO_SDK_UNITY_1.3.9_10156.jar (:UnityChannel:) and core-3.3.3.jar (com.google.zxing:core:3.3.3) Duplicate class com.google.zxing.aztec.AztecReader found in modules MIO_SDK_UNITY_1.3.9_10156.jar (:UnityChannel:) and core-3.3.3.jar (com.google.zxing:core:3.3.3) Duplicate class com.google.zxing.aztec.decoder.Decoder found in modules MIO_SDK_UNITY_1.3.9_10156.jar (:UnityChannel:) and core-3.3.3.jar (com.google.zxing:core:3.3.3) Duplicate class com.google.zxing.aztec.decoder.Decoder$1 found in modules MIO_SDK_UNITY_1.3.9_10156.jar (:UnityChannel:) and core-3.3.3.jar (com.google.zxing:core:3.3.3) Duplicate class com.google.zxing.aztec.decoder.Decoder$Table found in modules MIO_SDK_UNITY_1.3.9_10156.jar (:UnityChannel:) and core-3.3.3.jar (com.google.zxing:core:3.3.3) Duplicate class com.google.zxing.aztec.detector.Detector found in modules MIO_SDK_UNITY_1.3.9_10156.jar (:UnityChannel:) and core-3.3.3.jar (com.google.zxing:core:3.3.3) Duplicate class com.google.zxing.aztec.detector.Detector$Point found in modules MIO_SDK_UNITY_1.3.9_10156.jar (:UnityChannel:) and core-3.3.3.jar (com.google.zxing:core:3.3.3) Duplicate class com.google.zxing.client.result.AbstractDoCoMoResultParser found in modules MIO_SDK_UNITY_1.3.9_10156.jar (:UnityChannel:) and core-3.3.3.jar (com.google.zxing:core:3.3.3) Duplicate class com.google.zxing.client.result.AddressBookAUResultParser found in modules MIO_SDK_UNITY_1.3.9_10156.jar (:UnityChannel:) and core-3.3.3.jar (com.google.zxing:core:3.3.3) Duplicate class com.google.zxing.client.result.AddressBookDoCoMoResultParser found in modules MIO_SDK_UNITY_1.3.9_10156.jar (:UnityChannel:) and core-3.3.3.jar (com.google.zxing:core:3.3.3) Duplicate class com.google.zxing.client.result.AddressBookParsedResult found in modules MIO_SDK_UNITY_1.3.9_10156.jar (:UnityChannel:) and core-3.3.3.jar (com.google.zxing:core:3.3.3) Duplicate class com.google.zxing.client.result.BizcardResultParser found in modules MIO_SDK_UNITY_1.3.9_10156.jar (:UnityChannel:) and core-3.3.3.jar (com.google.zxing:core:3.3.3) Duplicate class com.google.zxing.client.result.BookmarkDoCoMoResultParser found in modules MIO_SDK_UNITY_1.3.9_10156.jar (:UnityChannel:) and core-3.3.3.jar (com.google.zxing:core:3.3.3) Duplicate class com.google.zxing.client.result.CalendarParsedResult found in modules MIO_SDK_UNITY_1.3.9_10156.jar (:UnityChannel:) and core-3.3.3.jar (com.google.zxing:core:3.3.3) Duplicate class com.google.zxing.client.result.EmailAddressParsedResult found in modules MIO_SDK_UNITY_1.3.9_10156.jar (:UnityChannel:) and core-3.3.3.jar (com.google.zxing:core:3.3.3) Duplicate class com.google.zxing.client.result.EmailAddressResultParser found in modules MIO_SDK_UNITY_1.3.9_10156.jar (:UnityChannel:) and core-3.3.3.jar (com.google.zxing:core:3.3.3) Duplicate class com.google.zxing.client.result.EmailDoCoMoResultParser found in modules MIO_SDK_UNITY_1.3.9_10156.jar (:UnityChannel:) and core-3.3.3.jar (com.google.zxing:core:3.3.3) Duplicate class com.google.zxing.client.result.ExpandedProductParsedResult found in modules MIO_SDK_UNITY_1.3.9_10156.jar (:UnityChannel:) and core-3.3.3.jar (com.google.zxing:core:3.3.3) Duplicate class com.google.zxing.client.result.ExpandedProductResultParser found in modules MIO_SDK_UNITY_1.3.9_10156.jar (:UnityChannel:) and core-3.3.3.jar (com.google.zxing:core:3.3.3) Duplicate class com.google.zxing.client.result.GeoParsedResult found in modules MIO_SDK_UNITY_1.3.9_10156.jar (:UnityChannel:) and core-3.3.3.jar (com.google.zxing:core:3.3.3) Duplicate class com.google.zxing.client.result.GeoResultParser found in modules MIO_SDK_UNITY_1.3.9_10156.jar (:UnityChannel:) and core-3.3.3.jar (com.google.zxing:core:3.3.3) Duplicate class com.google.zxing.client.result.ISBNParsedResult found in modules MIO_SDK_UNITY_1.3.9_10156.jar (:UnityChannel:) and core-3.3.3.jar (com.google.zxing:core:3.3.3) Duplicate class com.google.zxing.client.result.ISBNResultParser found in modules MIO_SDK_UNITY_1.3.9_10156.jar (:UnityChannel:) and core-3.3.3.jar (com.google.zxing:core:3.3.3) Duplicate class com.google.zxing.client.result.ParsedResult found in modules MIO_SDK_UNITY_1.3.9_10156.jar (:UnityChannel:) and core-3.3.3.jar (com.google.zxing:core:3.3.3) Duplicate class com.google.zxing.client.result.ParsedResultType found in modules MIO_SDK_UNITY_1.3.9_10156.jar (:UnityChannel:) and core-3.3.3.jar (com.google.zxing:core:3.3.3) Duplicate class com.google.zxing.client.result.ProductParsedResult found in modules MIO_SDK_UNITY_1.3.9_10156.jar (:UnityChannel:) and core-3.3.3.jar (com.google.zxing:core:3.3.3) Duplicate class com.google.zxing.client.result.ProductResultParser found in modules MIO_SDK_UNITY_1.3.9_10156.jar (:UnityChannel:) and core-3.3.3.jar (com.google.zxing:core:3.3.3) Duplicate class com.google.zxing.client.result.ResultParser found in modules MIO_SDK_UNITY_1.3.9_10156.jar (:UnityChannel:) and core-3.3.3.jar (com.google.zxing:core:3.3.3) Duplicate class com.google.zxing.client.result.SMSMMSResultParser found in modules MIO_SDK_UNITY_1.3.9_10156.jar (:UnityChannel:) and core-3.3.3.jar (com.google.zxing:core:3.3.3) Duplicate class com.google.zxing.client.result.SMSParsedResult found in modules MIO_SDK_UNITY_1.3.9_10156.jar (:UnityChannel:) and core-3.3.3.jar (com.google.zxing:core:3.3.3) Duplicate class com.google.zxing.client.result.SMSTOMMSTOResultParser found in modules MIO_SDK_UNITY_1.3.9_10156.jar (:UnityChannel:) and core-3.3.3.jar (com.google.zxing:core:3.3.3) Duplicate class com.google.zxing.client.result.SMTPResultParser found in modules MIO_SDK_UNITY_1.3.9_10156.jar (:UnityChannel:) and core-3.3.3.jar (com.google.zxing:core:3.3.3) Duplicate class com.google.zxing.client.result.TelParsedResult found in modules MIO_SDK_UNITY_1.3.9_10156.jar (:UnityChannel:) and core-3.3.3.jar (com.google.zxing:core:3.3.3) Duplicate class com.google.zxing.client.result.TelResultParser found in modules MIO_SDK_UNITY_1.3.9_10156.jar (:UnityChannel:) and core-3.3.3.jar (com.google.zxing:core:3.3.3) Duplicate class com.google.zxing.client.result.TextParsedResult found in modules MIO_SDK_UNITY_1.3.9_10156.jar (:UnityChannel:) and core-3.3.3.jar (com.google.zxing:core:3.3.3) Duplicate class com.google.zxing.client.result.URIParsedResult found in modules MIO_SDK_UNITY_1.3.9_10156.jar (:UnityChannel:) and core-3.3.3.jar (com.google.zxing:core:3.3.3) Duplicate class com.google.zxing.client.result.URIResultParser found in modules MIO_SDK_UNITY_1.3.9_10156.jar (:UnityChannel:) and core-3.3.3.jar (com.google.zxing:core:3.3.3) Duplicate class com.google.zxing.client.result.URLTOResultParser found in modules MIO_SDK_UNITY_1.3.9_10156.jar (:UnityChannel:) and core-3.3.3.jar (com.google.zxing:core:3.3.3) Duplicate class com.google.zxing.client.result.VCardResultParser found in modules MIO_SDK_UNITY_1.3.9_10156.jar (:UnityChannel:) and core-3.3.3.jar (com.google.zxing:core:3.3.3) Duplicate class com.google.zxing.client.result.VEventResultParser found in modules MIO_SDK_UNITY_1.3.9_10156.jar (:UnityChannel:) and core-3.3.3.jar (com.google.zxing:core:3.3.3) Duplicate class com.google.zxing.client.result.WifiParsedResult found in modules MIO_SDK_UNITY_1.3.9_10156.jar (:UnityChannel:) and core-3.3.3.jar (com.google.zxing:core:3.3.3) Duplicate class com.google.zxing.client.result.WifiResultParser found in modules MIO_SDK_UNITY_1.3.9_10156.jar (:UnityChannel:) and core-3.3.3.jar (com.google.zxing:core:3.3.3) Duplicate class com.google.zxing.common.BitArray found in modules MIO_SDK_UNITY_1.3.9_10156.jar (:UnityChannel:) and core-3.3.3.jar (com.google.zxing:core:3.3.3) Duplicate class com.google.zxing.common.BitMatrix found in modules MIO_SDK_UNITY_1.3.9_10156.jar (:UnityChannel:) and core-3.3.3.jar (com.google.zxing:core:3.3.3) Duplicate class com.google.zxing.common.BitSource found in modules MIO_SDK_UNITY_1.3.9_10156.jar (:UnityChannel:) and core-3.3.3.jar (com.google.zxing:core:3.3.3) Duplicate class com.google.zxing.common.CharacterSetECI found in modules MIO_SDK_UNITY_1.3.9_10156.jar (:UnityChannel:) and core-3.3.3.jar (com.google.zxing:core:3.3.3) Duplicate class com.google.zxing.common.DecoderResult found in modules MIO_SDK_UNITY_1.3.9_10156.jar (:UnityChannel:) and core-3.3.3.jar (com.google.zxing:core:3.3.3) Duplicate class com.google.zxing.common.DefaultGridSampler found in modules MIO_SDK_UNITY_1.3.9_10156.jar (:UnityChannel:) and core-3.3.3.jar (com.google.zxing:core:3.3.3) Duplicate class com.google.zxing.common.DetectorResult found in modules MIO_SDK_UNITY_1.3.9_10156.jar (:UnityChannel:) and core-3.3.3.jar (com.google.zxing:core:3.3.3) Duplicate class com.google.zxing.common.GlobalHistogramBinarizer found in modules MIO_SDK_UNITY_1.3.9_10156.jar (:UnityChannel:) and core-3.3.3.jar (com.google.zxing:core:3.3.3) Duplicate class com.google.zxing.common.GridSampler found in modules MIO_SDK_UNITY_1.3.9_10156.jar (:UnityChannel:) and core-3.3.3.jar (com.google.zxing:core:3.3.3) Duplicate class com.google.

Steps to Reproduce

  1. Create new unity 2019.4.26 project
  2. Set project build target to Android.
  3. Import Facebook SDK 11.0.0
  4. Import the latest Firebase Analytics SDK 8.1.0 into the project.
  5. Import External Dependency Manager
  6. Enable mainTemplate.gradle (Player settings -> publishing settings -> check custom gradle template)
  7. Click Assets -> External Dependency Manager -> Resolve
  8. Enable Jetifier when prompted (or Assets -> External Dependency Manager -> Settings -> Enable Jetifier)
  9. Build the project

Code Samples & Details

If you comment out the Firebase implementations in mainTemplate.gradle, the project compiles. If you comment out the Facebook implementations in mainTemplate.gradle, the project compiles.

However, having both UNCOMMENTED (enabled), the above exception is observed.

mulova commented 3 years ago

I got the same issue when including installreferrer jar from other library

DimaDDM commented 2 years ago

Same issue

Laur-Ivan commented 2 years ago

Any fix?

jkotzian commented 2 years ago

Getting the same issue on Unity 2020.3.16f1

Anyone have a fix? I updated Facebook SDK and Firebase, and I still get the error :/