Building Library\Bee\artifacts\Android\IntermediateFiles.txt failed with output: System.IO.FileNotFoundException: Could not find file '\Library\Bee\artifacts\Android\Gradle\build.gradle'. File name: 'Library\Bee\artifacts\Android\Gradle\build.gradle' at Microsoft.Win32.SafeHandles.SafeFileHandle.CreateFile(String fullPath, FileMode mode, FileAccess access, FileShare share, FileOptions options) at Microsoft.Win32.SafeHandles.SafeFileHandle.Open(String fullPath, FileMode mode, FileAccess access, FileShare share, FileOptions options, Int64 preallocationSize) at System.IO.Strategies.OSFileStreamStrategy..ctor(String path, FileMode mode, FileAccess access, FileShare share, FileOptions options, Int64 preallocationSize) at System.IO.Strategies.FileStreamHelpers.ChooseStrategyCore(String path, FileMode mode, FileAccess access, FileShare share, FileOptions options, Int64 preallocationSize) at System.IO.Strategies.FileStreamHelpers.ChooseStrategy(FileStream fileStream, String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, Int64 preallocationSize) at System.IO.StreamWriter.ValidateArgsAndOpenPath(String path, Boolean append, Encoding encoding, Int32 bufferSize) at
System.IO.File.WriteAllText(String path, String contents) at NiceIO.NPath.SystemIOFileSystem.File_WriteAllText(NPath path, String contents) at NiceIO.NPath.WindowsFileSystem.File_WriteAllText(NPath path, String contents) at NiceIO.NPath.WriteAllText(String contents) at AndroidPlayerBuildProgram.Actions.ActionGenerateProjectFiles.Run(CSharpActionContext context, Arguments arguments) in /home/bokken/build/output/unity/unity/Platforms/Android/AndroidPlayerBuildProgram/Actions/ActionGenerateProjectFiles.cs:line 46
UnityEditor.EditorApplication:Internal_CallDelayFunctions ()
Unity’s Bee build pipeline is not regenerating the Android Gradle folder at all — which means something deeper is blocking Unity from creating:
Library/Bee/artifacts/Android/Gradle/
If that folder never gets created, then every file Unity tries to write (build.gradle, boot.config, IntermediateFiles.txt, etc.) will fail with the same FileNotFoundException.
You’ve now seen:
- Missing
build.gradle - Missing
boot.config - Missing
IntermediateFiles.txt
This tells us:
✔ Unity is failing before it even begins generating the Android project
The Bee pipeline tries to create the folder structure, but something prevents it from doing so.
The most common causes:
1. A plugin is breaking the Android project generation step
This is the #1 cause when Bee folders fail to generate.
2. A custom Gradle template is malformed
Even a single misplaced { or } stops Unity from creating the Gradle folder.
3. Windows is blocking Unity from writing inside Library
This happens if the project is inside:
- Downloads
- OneDrive
- A synced folder
- A folder with restricted permissions
4. The project was moved and Unity cached absolute paths
Bee is extremely sensitive to path changes.
🛠️ The Fix That Works When Cache Deletion Isn’t Enough
✅ STEP 1 — Move the project OUT of Downloads
Downloads is a terrible place for Unity projects because:
- Windows Defender blocks writes
- Controlled Folder Access blocks writes
- OneDrive sometimes syncs Downloads
- Unity cannot reliably create subfolders
👉 Move the entire project to something like:
C:\UnityProjects
Then reopen Unity from the new location.
This alone fixes the issue for many developers.
✅ STEP 2 — Delete all Android build caches again
After moving the project, delete:
Library/Bee/
Library/Android/
Library/BuildPlayerData/
Library/Il2cppBuildCache/
Then reopen Unity.
✅ STEP 3 — Disable ALL custom Gradle templates
Go to:
Project Settings → Player → Android → Publishing Settings
Turn OFF:
- Custom Main Gradle Template
- Custom Launcher Template
- Custom Base Template
- Custom Gradle Properties Template
If any of these contain errors, Unity cannot generate the Gradle folder.
✅ STEP 4 — Temporarily disable all Android plugins
Rename this folder:
Assets/Plugins/Android → Assets/Plugins/Android_DISABLED
Then try building.
If the build suddenly works → one of your plugins is injecting invalid Gradle code.
✅ STEP 5 — Try “Export Project”
In Build Settings:
✔ Enable Export Project
✔ Build
If Unity fails earlier in the pipeline, it will give a more detailed error.
🧠 Why Moving the Project Is So Important
Unity’s Bee build system writes thousands of files during Android builds.
Windows treats the Downloads folder as a protected location.
This leads to:
- File creation blocked
- Folder creation blocked
- Partial writes
- Missing Gradle folders
- Exactly the errors you’re seeing
Moving the project to a neutral folder fixes all of this.
🎯 Summary
Your error is not about missing files — it’s about Unity being unable to create the Android Gradle folder at all.
The real fix: