Mapbox - Android build failing due to arcore files not found

Hi guys,

I am experiencing a rather annoying problem building to Android.

I have recently started to use Mapbox and, according to the sources, building to android should be a breeze.

Alas, I am getting this errors:

BuildFailedException: Not finding google_ar_required.aar and google_ar_optional.aar files needed for ARCore support. Were they moved from the ARCore SDK?
GoogleARCoreInternal.BuildHelper.OnPreprocessBuild (UnityEditor.Build.Reporting.BuildReport report) (at Assets/MapBox SDK/GoogleARCore/SDK/Scripts/Editor/BuildHelper.cs:68)
UnityEditor.Build.BuildPipelineInterfaces+c__AnonStorey0.<>m__1 (IPreprocessBuildWithReport bpp) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/BuildPipelineInterfaces.cs:314)
UnityEditor.Build.BuildPipelineInterfaces.InvokeCallbackInterfacesPair[IPreprocessBuild,IPreprocessBuildWithReport] (System.Collections.Generic.List1 oneInterfaces, System.Action1 invocationOne, System.Collections.Generic.List1 twoInterfaces, System.Action1 invocationTwo, Boolean exitOnFailure) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/BuildPipelineInterfaces.cs:294)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)

Error building Player: BuildFailedException: Not finding google_ar_required.aar and google_ar_optional.aar files needed for ARCore support. Were they moved from the ARCore SDK?

Build completed with a result of ‘Failed’
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)

UnityEditor.BuildPlayerWindow+BuildMethodException: 2 errors
at UnityEditor.BuildPlayerWindow+DefaultBuildMethods.BuildPlayer (BuildPlayerOptions options) [0x0021f] in C:\buildslave\unity\build\Editor\Mono\BuildPlayerWindowBuildMethods.cs:182
at UnityEditor.BuildPlayerWindow.CallBuildMethods (Boolean askForBuildLocation, BuildOptions defaultBuildOptions) [0x00065] in C:\buildslave\unity\build\Editor\Mono\BuildPlayerWindowBuildMethods.cs:89
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)

The files are both in the SDK folder though.

Any idea?

Cheers

hi. changing mapbox related folders directory can cause this error, just let them be in the root of your asset folder and don’t change their directory. this solved my problem. also, you can use this link : https://github.com/mapbox/mapbox-unity-sdk/issues/1208
I know its too late to post an answer but maybe it will help others.

You solved it?