Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Facebook SDK v7.17.0 update and Multiple precompiled assemblies with the same name

Discussion in 'Editor & General Support' started by Kali2048, Jun 28, 2019.

  1. Kali2048

    Kali2048

    Joined:
    Oct 16, 2013
    Posts:
    67
    We're using Unity 2018.4.1f1 and trying to update the Facebook SDK to v7.17.0 but we're getting the following error:

    PrecompiledAssemblyException: Multiple precompiled assemblies with the same name Facebook.Unity.Android.dll included for the current platform. Only one assembly with the same name is allowed per platform. Assembly path: {0}
    UnityEditor.Scripting.ScriptCompilation.EditorBuildRules.CreateTargetAssemblies (System.Collections.Generic.IEnumerable`1[T] customScriptAssemblies, System.Collections.Generic.IEnumerable`1[T] precompiledAssemblies) (at C:/buildslave/unity/build/Editor/Mono/Scripting/ScriptCompilation/EditorBuildRules.cs:249)
    UnityEditor.Scripting.ScriptCompilation.EditorCompilation.UpdateCustomTargetAssemblies () (at C:/buildslave/unity/build/Editor/Mono/Scripting/ScriptCompilation/EditorCompilation.cs:625)
    UnityEditor.Scripting.ScriptCompilation.EditorCompilation.SetAllCustomScriptAssemblyJsons (System.String[] paths) (at C:/buildslave/unity/build/Editor/Mono/Scripting/ScriptCompilation/EditorCompilation.cs:735)
    UnityEditor.Scripting.ScriptCompilation.EditorCompilationInterface.SetAllCustomScriptAssemblyJsons (System.String[] allAssemblyJsons) (at C:/buildslave/unity/build/Editor/Mono/Scripting/ScriptCompilation/EditorCompilationInterface.cs:217)

    We have tried the following:
    • Deleting the duplicated Facebook.Unity.Android.dll and Facebook.Unity.iOS.dll. That solved our problem for Android but created more errors of Facebook library missing for iOS, so we reverted back.
    • Disabling all services before updating
    • Deleting the Library folder
    The duplicated dll seem to be from the "facebook-unity-sdk-7.17.0.unitypackage".
    Is anyone else having this issue?
    Any way to fix this ?

    Thanks
     
  2. TristanCms

    TristanCms

    Joined:
    Mar 17, 2017
    Posts:
    29
    I'm having the same problem. I'm pretty sure I already had the same problem with FacebookSDK. I just can't remember how I solved it. I'll let you know if I find a way to fix it.
     
  3. Kali2048

    Kali2048

    Joined:
    Oct 16, 2013
    Posts:
    67
    Same situation for me, I had the same issue before and I solved it by doing what I've described above, but this time it's different it seems . . .
    Please let me know if you find any solution!
     
  4. YuriiVovchuk

    YuriiVovchuk

    Joined:
    Aug 8, 2016
    Posts:
    5
    sarebots2 likes this.
  5. Kali2048

    Kali2048

    Joined:
    Oct 16, 2013
    Posts:
    67
    Thanks, I'll do this until they fix it hopefully in the next update
     
  6. sohaib_qadri

    sohaib_qadri

    Joined:
    May 19, 2014
    Posts:
    8
    Hi,
    Did using FB SDK v7.16.0 work for you?
     
  7. Kali2048

    Kali2048

    Joined:
    Oct 16, 2013
    Posts:
    67
    Hi,
    I did not have time to try this yet, I've simply reverted back to our older version of the SDK for the time being.
     
  8. Kali2048

    Kali2048

    Joined:
    Oct 16, 2013
    Posts:
    67
    Facebook SDK 7.17.1 is available, I was hopping that they would have fixed it but after testing it, it gives me the same errors :(
    So I've used v7.16.0 and this version works without any error.
    Hopefully this will stop the Facebook alerts I'm receiving to update the SDK.

    btw I've posted about this problem on the Facebook support board and didn't get any reply. We can't be the only ones to get this error ...
    https://developers.facebook.com/community/threads/651649801978767/
     
  9. tumayvarel

    tumayvarel

    Joined:
    Mar 10, 2019
    Posts:
    6
    I have the same problem. I deleted Facebook.Unity.Andorid.dll in the Plugins/iOS folder and deleted Facebook.Unitıy.IOS.dll file in the Plugins/Andorid folder. It causes the problem. It removes the error, by doing that Facebook SDK works now without any problem at Andorid but not at iOS. That is not the correct way to solve this.
     
    Last edited: Jul 12, 2019
  10. NikolaiS

    NikolaiS

    Joined:
    Dec 28, 2012
    Posts:
    9
    Looks like the Facebook team selected all platforms for both Android and iOS libs by mistake in 7.17.1.

    To fix the issue just select only one platform for Facebook.Unity.Android.dll and Facebook.Unity.iOS.dll files in FacebookSDK\Plugins\Android and FacebookSDK\Plugins\iOS folders. Both files in Android folder should use Android platform and files in iOS folder should use iOS platform.

    Here is a screenshot:


    The error message is self-explanatory: Multiple precompiled assemblies with the same name Facebook.Unity.Android.dll included for the current platform.
     
    Last edited: Jul 16, 2019
  11. Kali2048

    Kali2048

    Joined:
    Oct 16, 2013
    Posts:
    67
    Thanks I'll try that :)
     
  12. hottabych

    hottabych

    Joined:
    Apr 18, 2015
    Posts:
    107
    Thanks, it works for me! :)