Search Unity

Plugin 'UnityARKit.a' is used from several locations - Build fail

Discussion in 'Unity Build Automation' started by Numa, Jul 10, 2020.

  1. Numa

    Numa

    Joined:
    Oct 7, 2014
    Posts:
    100
    Hi, I'm very new to cloud build. My builds are failing with this error:

    Code (CSharp):
    1. 29236: [Unity] ERROR: Plugin 'UnityARKit.a' is used from several locations:
    2. 29237: [Unity]  Packages/com.unity.xr.arkit/Runtime/iOS/Xcode1100/UnityARKit.a would be copied to <PluginPath>/UnityARKit.a
    3. 29238: [Unity]  Packages/com.unity.xr.arkit/Runtime/iOS/Xcode1000/UnityARKit.a would be copied to <PluginPath>/UnityARKit.a
    4. 29239: [Unity] Please fix plugin settings and try again.
    Is there something I need to do to exclude one of the libraries? Since it's a Unity package I don't think I can make change the plugin settings as suggested.

    Using Unity 2019.4.3f1 and ARKit 3.0.0 preview 4 (I know it's old but we're not really in a position to upgrade at the moment)

    Thanks
     
  2. Numa

    Numa

    Joined:
    Oct 7, 2014
    Posts:
    100
    Update: This error seems to not always be there but the build still fails. If I do a clean build the first build always has it, subsequent builds don't.
     
  3. Numa

    Numa

    Joined:
    Oct 7, 2014
    Posts:
    100
    If it helps anyone, I got rid of the error by using this script since I don't need the xcode 10 one:

    Code (CSharp):
    1. private void DisableARKitPluginDuplicate()
    2.     {
    3.         var allImporters = PluginImporter.GetAllImporters();
    4.         foreach (var importer in allImporters)
    5.         {
    6.             if (importer.assetPath.Contains("unity.xr.arkit/Runtime/iOS/Xcode1000"))
    7.             {
    8.                 Debug.Log($"Changing platform compatibility for {importer.assetPath}");
    9.                 importer.SetCompatibleWithPlatform(BuildTarget.iOS, false);
    10.             }
    11.         }
    12.     }
     
    Xtro and BattlefieldNoob like this.
  4. Dalton-Lima

    Dalton-Lima

    Joined:
    Dec 21, 2016
    Posts:
    19
    I've solved it by deleting the `Library` folder. :rolleyes:

    For those who aren't familiar, this folder is recreated by Unity, so no harm here.
    I bet that going back-and-forth with packages leave some old unused libraries in there.
     
  5. Chris-KillerSnails

    Chris-KillerSnails

    Joined:
    Oct 6, 2017
    Posts:
    4
    I ended up just deleting the Library/PackageCache/com.unity.xr.arkit@x.x.x/iOS/ folder and restarting the project.
     
  6. Xtro

    Xtro

    Joined:
    Apr 17, 2013
    Posts:
    610
    This code piece saved my life today!
     
    Numa likes this.