[Android build] IOException: The file exists
Describe the bug
When I build the demo android sample, It's successfully at first time, but I rebuild, it will show the error
Steps to reproduce
- Build to apk, and installed
- Rebuild but it can not because the error
LLMUnity version
2.2.4
Operating System
Windows
Hi! This could be due to an interrupted build.
Could you try again after deleting this folder?
C:\Users\[USER]\AppData\Local\Temp\[COMPANY]\[PROJECT]\LLMUnityBuild
The company name will be "DefaultCompany" if you haven't specified it in Unity
The above solution should resolve the issue, let me know if you still face it
Same happen to me on unity 6000.0.24f1. Need to restart my computer to build (and not clic on play button before). I got the error even if i restart unity, directly whene scene open in editor.
IOException: Le fichier existe System.IO.FileSystem.MoveFile (System.String sourceFullPath, System.String destFullPath) (at <321eb2db7c6d43ea8fc39b54eaca3452>:0) System.IO.File.Move (System.String sourceFileName, System.String destFileName) (at <321eb2db7c6d43ea8fc39b54eaca3452>:0) LLMUnity.LLMBuilder.HandleActionFileRecursive (System.String source, System.String target, LLMUnity.ActionCallback actionCallback) (at Assets/LLMUnity/Runtime/LLMBuilder.cs:37) LLMUnity.LLMBuilder.HandleActionFileRecursive (System.String source, System.String target, LLMUnity.ActionCallback actionCallback) (at Assets/LLMUnity/Runtime/LLMBuilder.cs:47) LLMUnity.LLMBuilder.MovePath (System.String source, System.String target) (at Assets/LLMUnity/Runtime/LLMBuilder.cs:79) LLMUnity.LLMBuilder.MoveAction (System.String source, System.String target, System.Boolean addEntry) (at Assets/LLMUnity/Runtime/LLMBuilder.cs:118) LLMUnity.LLMBuilder.Reset () (at Assets/LLMUnity/Runtime/LLMBuilder.cs:204) LLMUnity.LLMBuildProcessor.<BuildCompleted>b__5_0 () (at Assets/LLMUnity/Editor/LLMBuildProcessor.cs:58) UnityEditor.EditorApplication.Internal_CallDelayFunctions () (at <5d5fdc1eeb2a4f39b26caadc7b79ec7e>:0)
Hi! This could be due to an interrupted build. Could you try again after deleting this folder?
C:\Users\[USER]\AppData\Local\Temp\[COMPANY]\[PROJECT]\LLMUnityBuildThe company name will be "DefaultCompany" if you haven't specified it in Unity
if i delete this folder, i have this new error :
UnauthorizedAccessException: Access to the path 'undreamai_windows-avx2.dll' is denied.
System.IO.FileSystem.RemoveDirectoryRecursive (System.String fullPath, Interop+Kernel32+WIN32_FIND_DATA& findData, System.Boolean topLevel) (at <321eb2db7c6d43ea8fc39b54eaca3452>:0)
System.IO.FileSystem.RemoveDirectory (System.String fullPath, System.Boolean recursive) (at <321eb2db7c6d43ea8fc39b54eaca3452>:0)
System.IO.Directory.Delete (System.String path, System.Boolean recursive) (at <321eb2db7c6d43ea8fc39b54eaca3452>:0)
LLMUnity.LLMBuilder.DeletePath (System.String path) (at Assets/LLMUnity/Runtime/LLMBuilder.cs:95)
LLMUnity.LLMBuilder.MovePath (System.String source, System.String target) (at Assets/LLMUnity/Runtime/LLMBuilder.cs:80)
LLMUnity.LLMBuilder.MoveAction (System.String source, System.String target, System.Boolean addEntry) (at Assets/LLMUnity/Runtime/LLMBuilder.cs:118)
LLMUnity.LLMBuilder.HideLibraryPlatforms (System.String platform) (at Assets/LLMUnity/Runtime/LLMBuilder.cs:165)
LLMUnity.LLMBuilder.Build (System.String platform) (at Assets/LLMUnity/Runtime/LLMBuilder.cs:187)
LLMUnity.LLMBuildProcessor.OnPreprocessBuild (UnityEditor.Build.Reporting.BuildReport report) (at Assets/LLMUnity/Editor/LLMBuildProcessor.cs:36)
UnityEditor.Build.BuildPipelineInterfaces+<>c__DisplayClass16_0.<OnBuildPreProcess>b__1 (UnityEditor.Build.IPreprocessBuildWithReport bpp) (at <5d5fdc1eeb2a4f39b26caadc7b79ec7e>:0)
UnityEditor.Build.BuildPipelineInterfaces.InvokeCallbackInterfacesPair[T1,T2] (System.Collections.Generic.List1[T] oneInterfaces, System.Action1[T] invocationOne, System.Collections.Generic.List1[T] twoInterfaces, System.Action1[T] invocationTwo, System.Boolean exitOnFailure) (at <5d5fdc1eeb2a4f39b26caadc7b79ec7e>:0)
UnityEditor.BuildPlayerWindow:BuildPlayerAndRun()
can you also delete the Assets/StreamingAssets/undream* folder, restart Unity and wait for it to be downloaded again?
ok i deleted temp folder and streamingAssets content folder, restart unity , it start downloading zip file in temp folder, extract it in streamingassets folder, remove the zip file from temp folder, "Download Complete" i click play mode (android demo scene) > all is ok no error. Build on android > UnauthorizedAccessException: Access to the path 'undreamai_windows-avx2.dll' is denied. the temp folder get all the platforms but the streaminasset folder can't be totaly empty, it stay some platforms with windows-avx2. The LLMBuilder.cs script can't remove the undreamai_windows-avx2.dll , need to stop it before .
looklike https://github.com/undreamai/LLMUnity/issues/250
also, in the temp folder stay the windows-avx2 folder, so error "file exist" appear.
Maybe ? https://www.forrestthewoods.com/blog/debugging-a-dynamic-library-that-wouldnt-unload/
Thank you! I free the library here. It needs some investigation..
yes :) , that why i think about looking inside the dll.... thank you to look at it !