[Android, Burst, Build] Could not find a part of the path '... \Temp\StagingArea\tempburstlibs'

Situation:
I would like to run and profile my app on android device using ‘build and run’.
This worked perfectly fine a month ago.

When I click ‘build and run’ for android. It fails, showing this popup:

Question:
How can I rectify this and run my app on android like I used to? The logs don’t tell me much - only that a folder is not being generated during build.

More observations:

  • The directory Temp\StagingArea\ does not contain tempburstlibs folder. Who is supposed to generate this folder?

  • However, the build succeeds if I instead use ‘build’ for android (error appears in editor.log; but build is successful and can be installed to device).

  • The error does not appear in the log if Building for windows.

Build settings:
backend: IL2CPP
API : dotnet standard2.0
Strip engine code : OFF
Managed Stripping level : LOW

Packages in project:

Relevant snippet of editor.log:

Android PostProcess task “IL2CPP” took 28598.3739 ms
Android PostProcess task “Build native Unity binary” took 0.1726 ms
Android PostProcess task “Zipping symbols” took 0.3051 ms
Android PostProcess task “Performance Reporting Symbol Upload” took 0.2947 ms
Android PostProcess task “Preparing streaming assets” took 1501.5512 ms
Android PostProcess task “Creating APK expansion package (OBB)” took 0.1388 ms
DirectoryNotFoundException: Could not find a part of the path ‘D:\Windows-data\workspace\unity\LMV_unity\Temp\StagingArea\tempburstlibs’.
at System.IO.__Error.WinIOError (System.Int32 errorCode, System.String maybeFullPath) [0x000f7] in <695d1cc93cca45069c528c15c9fdd749>:0
at System.IO.FileSystemEnumerableIterator1[TSource].HandleError (System.Int32 hr, System.String path) [0x00006] in <695d1cc93cca45069c528c15c9fdd749>:0 at System.IO.FileSystemEnumerableIterator1[TSource].CommonInit () [0x00054] in <695d1cc93cca45069c528c15c9fdd749>:0
at System.IO.FileSystemEnumerableIterator1[TSource]..ctor (System.String path, System.String originalUserPath, System.String searchPattern, System.IO.SearchOption searchOption, System.IO.SearchResultHandler1[TSource] resultHandler, System.Boolean checkHost) [0x000d6] in <695d1cc93cca45069c528c15c9fdd749>:0
at System.IO.FileSystemEnumerableFactory.CreateFileNameIterator (System.String path, System.String originalUserPath, System.String searchPattern, System.Boolean includeFiles, System.Boolean includeDirs, System.IO.SearchOption searchOption, System.Boolean checkHost) [0x00009] in <695d1cc93cca45069c528c15c9fdd749>:0
at System.IO.Directory.InternalGetFileDirectoryNames (System.String path, System.String userPathOriginal, System.String searchPattern, System.Boolean includeFiles, System.Boolean includeDirs, System.IO.SearchOption searchOption, System.Boolean checkHost) [0x00000] in <695d1cc93cca45069c528c15c9fdd749>:0
at System.IO.Directory.InternalGetFiles (System.String path, System.String searchPattern, System.IO.SearchOption searchOption) [0x00000] in <695d1cc93cca45069c528c15c9fdd749>:0
at System.IO.Directory.GetFiles (System.String path) [0x0000e] in <695d1cc93cca45069c528c15c9fdd749>:0
at UnityEditor.FileUtil.CopyDirectoryFiltered (System.String source, System.String target, System.Boolean overwrite, System.Func`2[T,TResult] includeCallback, System.Boolean recursive) [0x0000c] in <015079d9a4ea4f97b4381e694d2310c1>:0
at UnityEditor.FileUtil.CopyDirectoryFiltered (System.String source, System.String target, System.Boolean overwrite, System.String regExExcludeFilter, System.Boolean recursive) [0x0004d] in <015079d9a4ea4f97b4381e694d2310c1>:0
at UnityEditor.FileUtil.CopyDirectoryRecursiveFiltered (System.String source, System.String target, System.Boolean overwrite, System.String regExExcludeFilter) [0x00001] in <015079d9a4ea4f97b4381e694d2310c1>:0
at UnityEditor.FileUtil.CopyDirectoryRecursive (System.String source, System.String target, System.Boolean overwrite, System.Boolean ignoreMeta) [0x00001] in <015079d9a4ea4f97b4381e694d2310c1>:0
at UnityEditor.FileUtil.CopyDirectoryRecursive (System.String source, System.String target, System.Boolean overwrite) [0x00001] in <015079d9a4ea4f97b4381e694d2310c1>:0
at Unity.Burst.Editor.BurstAndroidGradlePostprocessor.UnityEditor.Android.IPostGenerateGradleAndroidProject.OnPostGenerateGradleAndroidProject (System.String path) [0x00036] in D:\Windows-data\workspace\unity\LMV_unity\Library\PackageCache\com.unity.burst@1.5.4\Editor\BurstAotCompiler.cs:111
at UnityEditor.Android.AndroidBuildPipelineInterfaces.OnGeneratePlatformProjectPostprocess (System.String path, System.Boolean strict) [0x00026] in <015079d9a4ea4f97b4381e694d2310c1>:0
UnityEngine.DebugLogHandler:Internal_LogException(Exception, Object)
UnityEngine.DebugLogHandler:LogException(Exception, Object)
UnityEngine.Logger:LogException(Exception, Object)
UnityEngine.Debug:LogException(Exception)
UnityEditor.Android.AndroidBuildPipelineInterfaces:OnGeneratePlatformProjectPostprocess(String, Boolean)

Any help is really appreciated! Might just remove burst if I can’t find the root of this

1 Like

here is the relevant log file.

7397408–903563–editor.log_snippet.txt (9.06 KB)

Solved Tentatively.
Project Settings > Burst AOT Settings > Enable Burst Compilation (Android)

1 Like

Hello @alexiscatnip , we are aware of this issue and are looking into it.

1 Like