Cloud build failure: Moving File UnityTempFile-6f4619036b2fe47fca6236a8d5382ae5 to Editor-5.x/Layouts/LastLayout.dwlt failed.
I am getting the following error messages in my cloud build. Could someone please help understanding what is going wrong?
Please note that the same code builds just fine for my Windows and iOS targets. It seems to be very specific to the Android platform. Also, I have already tried a "Clean Build" and it doesn't help.
[Unity] at UnityEditor.Android.Command.WaitForProgramToRun (UnityEditor.Utils.Program p, UnityEditor.Android.WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg) [0x00000] in <filename unknown>:0
856: [Unity] at UnityEditor.Android.Command.Run (System.Diagnostics.ProcessStartInfo psi, UnityEditor.Android.WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg) [0x00000] in <filename unknown>:0
857: [Unity] at UnityEditor.Android.AndroidJavaTools.RunJava (System.String args, System.String workingdir, System.Action`1 progress, System.String error) [0x00000] in <filename unknown>:0
858: [Unity] Rethrow as GradleInvokationException: Gradle build failed
859: [Unity] Player export failed. Reason: CommandInvokationFailure: Gradle build failed.
860: [Unity] ERROR: File Library/Unused/ee46564d5fe444501909afdcff335c1a couldn't be written. Because moving /BUILD_PATH/brimming-pouch.zombie-idle-evolution.default-android/Temp/UnityTempFile-020103424236c4473b9d2e693d12f87f to /BUILD_PATH/Library/Preferences/Unity/Editor-5.x/Layouts/LastLayout.dwlt failed.
861: [Unity] ERROR: File Library/Unused/ee46564d5fe444501909afdcff335c1a couldn't be written. Because moving /BUILD_PATH/brimming-pouch.zombie-idle-evolution.default-android/Temp/UnityTempFile-6f4619036b2fe47fca6236a8d5382ae5 to /BUILD_PATH/Library/Preferences/Unity/Editor-5.x/Layouts/LastLayout.dwlt failed.
862: publishing finished successfully.
863: Finished: FAILURE
Answer by plourdegui · Oct 31, 2018 at 10:04 PM
I have fixed the issue with forcing the unity version to "Always Use Latest 2018.1" as opposed to "Always Use Latest 2018.x" and I have set the "Android Build System" to "Internal" rather than "Gradle".
Your answer
![](https://koobas.hobune.stream/wayback/20220612181210im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
GoogleFu / Google2U Unity cloud build fail (Web / Android) 0 Answers
unity cloud build IOS 0 Answers
Unity could build Error when build start. 0 Answers
Why does Unity Cloud Build Keep Failing? 1 Answer
Unity cloud build by xcode 7 2 Answers