Today I was trying to build a VR sample scene for Oculus Go. But when I tried the build or build and run are all failed.
Error Message on build and run:
Build completed with a result of ‘Failed’
UnityEditor.BuildPlayerWindow:BuildPlayerAndRun()
UnityEditor.BuildPlayerWindow+BuildMethodException: 3 errors
at UnityEditor.BuildPlayerWindow+DefaultBuildMethods.BuildPlayer (UnityEditor.BuildPlayerOptions options) [0x00234] 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:96
UnityEditor.BuildPlayerWindow:BuildPlayerAndRun()
Error message on Build only:
UnauthorizedAccessException: Access to the path “Assets\Oculus\VR\Plugins\1.32.0\Android\OVRPlugin.aar” or “Temp\StagingArea\aar\OVRPlugin.aar” is denied.
System.IO.File.Copy (System.String sourceFileName, System.String destFileName, System.Boolean overwrite) (at :0)
UnityEditor.FileUtil.UnityFileCopy (System.String from, System.String to, System.Boolean overwrite) (at C:/buildslave/unity/build/Editor/Mono/FileUtil.cs:210)
UnityEditor.Android.PostProcessor.Tasks.NativePlugins.ProcessPlugin (UnityEditor.Android.PostProcessor.PostProcessorContext context, System.String pluginPath, System.String pluginTargetCPU) (at :0)
Build completed with a result of ‘Succeeded’
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)
But I cannot find the built apk or anything in the destination folder.
That exactly is this problem and what I can do to fix it.