I am building an Augmented Reality application where you can place an object when arriving at a specific location.
Importing the Mapbox SDK works fine but the moment I try to build my application I get the following error:
Found plugins with same names, Packages/com.unity.xr.arcore/Runtime/Android/arcore_client.aar and Assets/GoogleARCore/SDK/Plugins/arcore_client.aar. Delete the one of the duplicate plugins.
UnityEditor.AndroidPluginImporterExtension:CheckFileCollisions(String)
UnityEditorInternal.PluginsHelper:CheckFileCollisions(BuildTarget) (at C:/buildslave/unity/build/Editor/Mono/Plugins/PluginsHelper.cs:25)
UnityEditor.BuildPlayerWindow:BuildPlayerAndRun() (at C:/buildslave/unity/build/Editor/Mono/BuildPlayerWindow.cs:122)
Plugins colliding with each other.
Build completed with a result of 'Failed'
UnityEditor.BuildPlayerWindow:BuildPlayerAndRun() (at C:/buildslave/unity/build/Editor/Mono/BuildPlayerWindow.cs:122)
UnityEditor.BuildPlayerWindow+BuildMethodException: 2 errors
at UnityEditor.BuildPlayerWindow+DefaultBuildMethods.BuildPlayer (UnityEditor.BuildPlayerOptions options) [0x00242] in C:\buildslave\unity\build\Editor\Mono\BuildPlayerWindowBuildMethods.cs:190
at UnityEditor.BuildPlayerWindow.CallBuildMethods (System.Boolean askForBuildLocation, UnityEditor.BuildOptions defaultBuildOptions) [0x0007f] in C:\buildslave\unity\build\Editor\Mono\BuildPlayerWindowBuildMethods.cs:95
UnityEditor.BuildPlayerWindow:BuildPlayerAndRun() (at C:/buildslave/unity/build/Editor/Mono/BuildPlayerWindow.cs:122)
Apparently Android/arcore_client.aar and Assets/GoogleARCore/SDK/Plugins/arcore_client.aar are colliding, the latter is getting imported from Mapbox.
What have I tried
- I tried disabling the
GoogleARCore/SDK/Plugins/arcore_client.aarlike shown in the image below:
This made it possible to build the application, however the AR Camera in all of the scenes that use arcore-arfoundation for plane detection and object placement did not activate when starting the scene. Instead, I would get a skybox view.
I have no idea why this happens because it works perfectly before importing Mapbox and the arcore_client.aar that I disabled should not affect this as this was imported together with the Mapbox SDK. My guess is that it stopped working the moment I imported Mapbox and not when I disabled the arcore_client.aar .
I tried deleting
Android/arcore_client.aarinstead of disablingGoogleARCore/SDK/Plugins/arcore_client.aar, which gives a lot of errors.I tried using Wikitude AR camera and plane detection. This works but the tracking is a lot worse than that of Google ARCore so this is not an option.
I tried messing with the AR camera options in the inspector, no luck so far. These are the settings that I tried:
I am using Unity 2019.2.21f1.

