Android, ARCore: Problem with building and run

I have a problem with building and run a simple app for android using ARCore.
The application replaces an image with a video.

when I press building and run these errors come out, I searched for solutions but with no luck.

Has this happened to anyone else?

(I don’t know if it’s important, but I’m using unity 2019.1.4.f1 and ARCore v1.9.0)

  • BuildFailedException: Temp/UnityTempFile-faa6373b0ed492242af9ce19b7be92aa\inputImages:line 1: Invalid width specified: 0.
    GoogleARCoreInternal.AugmentedImageDatabasePreprocessBuild.OnPreprocessBuild (UnityEditor.BuildTarget target, System.String path) (at Assets/GoogleARCore/SDK/Scripts/Editor/AugmentedImageDatabasePreprocessBuild.cs:44)
    GoogleARCoreInternal.PreprocessBuildBase.OnPreprocessBuild (UnityEditor.Build.Reporting.BuildReport report) (at Assets/GoogleARCore/SDK/Scripts/Editor/PreprocessBuildBase.cs:52)
    UnityEditor.Build.BuildPipelineInterfaces+c__AnonStorey0.<>m__1 (UnityEditor.Build.IPreprocessBuildWithReport bpp) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/BuildPipelineInterfaces.cs:376)
    UnityEditor.Build.BuildPipelineInterfaces.InvokeCallbackInterfacesPair[T1,T2] (System.Collections.Generic.List1[T] oneInterfaces, System.Action1[T] invocationOne, System.Collections.Generic.List1[T] twoInterfaces, System.Action1[T] invocationTwo, System.Boolean exitOnFailure) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/BuildPipelineInterfaces.cs:356)
    UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)

  • Error building Player: BuildFailedException: Temp/UnityTempFile-faa6373b0ed492242af9ce19b7be92aa\inputImages:line 1: Invalid width specified: 0.

  • UnityEditor.BuildPlayerWindow+BuildMethodException: 2 errors
    at UnityEditor.BuildPlayerWindow+DefaultBuildMethods.BuildPlayer (UnityEditor.BuildPlayerOptions options) [0x00242] in C:\buildslave\unity\build\Editor\Mono\BuildPlayerWindowBuildMethods.cs:194
    at UnityEditor.BuildPlayerWindow.CallBuildMethods (System.Boolean askForBuildLocation, UnityEditor.BuildOptions defaultBuildOptions) [0x0007f] in C:\buildslave\unity\build\Editor\Mono\BuildPlayerWindowBuildMethods.cs:97
    UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)

I have the same problem as soon as i insert a width value with floating point(like 0.52) for an AugmentedImageDataEntry.

This is issue with arcore-unity-sdk code.
The fix is in this change on github.

I’m using ARCore 1.17 and ended up here, because of the reference image width error as you had Invalid width specified: 0. I had same when I wanted to set width with decimals. I found a work around, in Unity I right clicked on augmented image db file and set Show in Explorer. Here I opened the db file with VS and I set the 0 values to my required number (0.078) and saved. When I loaded the db in unity it showed the 0.078 width and didn’t throw me error on build.