mapbox-unity-sdk
mapbox-unity-sdk copied to clipboard
Unity + Mapbox + ARCore __Colliding plugins error + ARCamera does't activate after importing Mapbox SDK
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.aar
like 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.aar
instead 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. - mapbox-unity-sdk_v2.1.1
have same problem
same problem
Hey there!
I had a similar problem, and I found disabling ALL the .aar files (unchecking the 'Android' check box) in Assets/GoogleARCore/SDK/Plugins/
worked for me. Was able to build to Android successfully with AR camera working.
My setup: Unity 2019.4.28f1 LTS mapbox-unity-sdk_v2.1.1
Installed from Unity Package Manager:
- AR Foundation v4.1.7
- ARCore XR Plugin v4.1.7
- ARKit XR Plugin v4.1.7
See if you have any luck with this.