- Home /
Can't build for either iOS or Android: Failed to copy/move file
Hello everyone! Recently I've found this issue that doesn't let me build for either iOS or Android. I'm trying to release it, so any help would be tremendous help! Here are the error logs if they are any help (sorry for the lengthy text!):
iOS error:
IOException: Failed to Copy File / Directory from 'Temp/il2cppOutput\il2cppOutput' to 'F:/Build Linear 3/Classes/Native'. UnityEditor.FileUtil.CopyFileOrDirectory (System.String source, System.String dest) (at C:/buildslave/unity/build/Editor/Mono/FileUtil.bindings.cs:35) UnityEditor.iOS.Utils.ReplaceFileOrDirectoryCopy (System.String src, System.String dst) (at C:/buildslave/unity/build/PlatformDependent/iPhonePlayer/Extensions/Common/Utils.cs:572) UnityEditor.iOS.PostProcessiPhonePlayer.UpdateInstallLocation (UnityEditor.iOS.PostProcessiPhonePlayer+ProjectPaths paths, UnityEditor.iOS.PostProcessiPhonePlayer+BuildSettings bs, UnityEditor.iOS.PostProcessiPhonePlayer+IncludedFileList includedFiles, UnityEditor.Build.Reporting.BuildReport buildReport)
Android error:
IOException: Failed to Move File / Directory from 'Temp/StagingArea\symbols\LinearAndroid-1.1.3-v24.symbols.zip' to 'F:\Built Linear Android\build27\LinearAndroid-1.1.3-v24.symbols.zip'. UnityEditor.FileUtil.MoveFileOrDirectory (System.String source, System.String dest) (at C:/buildslave/unity/build/Editor/Mono/FileUtil.bindings.cs:77) UnityEditor.Android.PostProcessor.Tasks.ZipIl2cppSymbols.Execute (UnityEditor.Android.PostProcessor.PostProcessorContext context) (at :0) > UnityEditor.Android.PostProcessor.PostProcessRunner.RunAllTasks > (UnityEditor.Android.PostProcessor.PostProcessorContext > context)
It happens at 'Converting Managed assemblies to C++' on iOS and on 'Zipping il2cpp symbols' for android. I've tried restarting everything and updating my project to 2019.3, however these didn't work. Any ideas? Any input would be great, thanks!
EDIT: It seems the solution is to set the .gradle folder to not read-only. However when I try to do this, it keeps reverting to read-only.
EDIT: The problem seems to have been resolved by either all the permission changes that I've made to the C driver in order to get rid of that "read-only" problem (which wasn't actually a problem) or by the fact that this time, I've built into the C driver. Most likely the latter. Kinda like this guy
EDIT: The USB drive I was building to was full, which is why building to the C drive worked
Your answer
Follow this Question
Related Questions
Object speed is much slower on iOS and Android build than on Editor 2 Answers
Android module in Build Settings - URL error 1 Answer
I can't build a game for android 2 Answers
CommandInvokationFailure: Gradle build failed. when building app bundle 0 Answers
Gradle build faild. see... error "in unity 2020.1.4f1!!!" 0 Answers