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

Hi, I’m very new to cloud build. My builds are failing with this error:

29236: [Unity] ERROR: Plugin 'UnityARKit.a' is used from several locations:
29237: [Unity]  Packages/com.unity.xr.arkit/Runtime/iOS/Xcode1100/UnityARKit.a would be copied to <PluginPath>/UnityARKit.a
29238: [Unity]  Packages/com.unity.xr.arkit/Runtime/iOS/Xcode1000/UnityARKit.a would be copied to <PluginPath>/UnityARKit.a
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

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.

If it helps anyone, I got rid of the error by using this script since I don’t need the xcode 10 one:

private void DisableARKitPluginDuplicate()
    {
        var allImporters = PluginImporter.GetAllImporters();
        foreach (var importer in allImporters)
        {
            if (importer.assetPath.Contains("unity.xr.arkit/Runtime/iOS/Xcode1000"))
            {
                Debug.Log($"Changing platform compatibility for {importer.assetPath}");
                importer.SetCompatibleWithPlatform(BuildTarget.iOS, false);
            }
        }
    }
2 Likes

I’ve solved it by deleting the Library folder. :roll_eyes:

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.

I ended up just deleting the Library/PackageCache/com.unity.xr.arkit@x.x.x/iOS/ folder and restarting the project.

This code piece saved my life today!

1 Like