-1

This is my first question here and I am really new to development. So I am hoping that I can get help to figure out this problem I couldn't resolve for days now. I get the following error when I try to build for IL2CPP:

DirectoryNotFoundException: Could not find a part of the path "C:\Users\Public\Documents\Wondershare\CreatorTemp\tmp517a91d3.tmp". System.IO.FileStream..ctor (System.String path, System.IO.FileMode mode, System.IO.FileAccess access, System.IO.FileShare share, System.Int32 bufferSize, System.Boolean anonymous, System.IO.FileOptions options) (at <9577ac7a62ef43179789031239ba8798>:0) (wrapper remoting-invoke-with-check) System.IO.FileStream..ctor(string,System.IO.FileMode,System.IO.FileAccess,System.IO.FileShare,int,bool,System.IO.FileOptions) System.IO.Path.GetTempFileName () (at <9577ac7a62ef43179789031239ba8798>:0) UnityEditor.MonoAssemblyStripping.GenerateLinkXmlToPreserveDerivedTypes (System.String librariesFolder, UnityEditor.RuntimeClassRegistry usedClasses) (at <8f44d91b549e47c9883e180579f26ef6>:0) UnityEditorInternal.AssemblyStripper.RunAssemblyStripper (UnityEditorInternal.UnityLinkerRunInformation runInformation) (at <8f44d91b549e47c9883e180579f26ef6>:0) UnityEditorInternal.AssemblyStripper.StripAssemblies (System.String managedAssemblyFolderPath, UnityEditorInternal.BaseUnityLinkerPlatformProvider unityLinkerPlatformProvider, UnityEditorInternal.IIl2CppPlatformProvider il2cppPlatformProvider, UnityEditor.RuntimeClassRegistry rcr, UnityEditor.ManagedStrippingLevel managedStrippingLevel) (at <8f44d91b549e47c9883e180579f26ef6>:0) UnityEditorInternal.IL2CPPBuilder.Run () (at <8f44d91b549e47c9883e180579f26ef6>:0) UnityEditorInternal.IL2CPPUtils.RunIl2Cpp (System.String tempFolder, System.String stagingAreaData, UnityEditorInternal.IIl2CppPlatformProvider platformProvider, System.Action`1[T] modifyOutputBeforeCompile, UnityEditor.RuntimeClassRegistry runtimeClassRegistry) (at <8f44d91b549e47c9883e180579f26ef6>:0) UnityEditor.Android.PostProcessor.Tasks.RunIl2Cpp.Execute (UnityEditor.Android.PostProcessor.PostProcessorContext context) (at <7b4f8e7483ca4be7941768c84eb1011d>:0) UnityEditor.Android.PostProcessor.PostProcessRunner.RunAllTasks (UnityEditor.Android.PostProcessor.PostProcessorContext context) (at <7b4f8e7483ca4be7941768c84eb1011d>:0) UnityEditor.Android.PostProcessAndroidPlayer.PostProcess (UnityEditor.BuildTarget target, System.String stagingAreaData, System.String stagingArea, System.String playerPackage, System.String installPath, System.String companyName, System.String productName, UnityEditor.BuildOptions options, UnityEditor.RuntimeClassRegistry usedClassRegistry, UnityEditor.Build.Reporting.BuildReport report) (at <7b4f8e7483ca4be7941768c84eb1011d>:0) UnityEditor.Android.AndroidBuildPostprocessor.PostProcess (UnityEditor.Modules.BuildPostProcessArgs args, UnityEditor.BuildProperties& outProperties) (at <7b4f8e7483ca4be7941768c84eb1011d>:0) UnityEditor.PostprocessBuildPlayer.Postprocess (UnityEditor.BuildTargetGroup targetGroup, UnityEditor.BuildTarget target, System.String installPath, System.String companyName, System.String productName, System.Int32 width, System.Int32 height, UnityEditor.BuildOptions options, UnityEditor.RuntimeClassRegistry usedClassRegistry, UnityEditor.Build.Reporting.BuildReport report) (at <8f44d91b549e47c9883e180579f26ef6>:0) UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr, Boolean&)

This error occurs only when build with IL2CPP and persist even in new projects. It started occuring after I added "facebook sdk for unity" to my project, resolved dependencies and changed system variables. So here is what I have tried so far:

-Removed facebook sdk and changed some dependencies related to it. -Removed back the system variables I added (https://answers.unity.com/questions/616484/open-ssl-not-found.html). -Removed folders from the pc related to wondershare. -Cleared .gradle folder in my users. -Removed the library and temp folders in my project. -Re-installed the build tools for android (installed with unity).

I am not sure if I overstepped something, any help will be much appreciated.

Gokce
  • 1
  • 1
  • Perhaps there is some relevant information in the comments here? https://stackoverflow.com/questions/51800235/unity-build-error-directorynotfoundexception – Bart Mar 06 '21 at 13:32
  • I have already checked all the messages there and looked into everything discussed, to no luck. – Gokce Mar 06 '21 at 15:08

1 Answers1

0

I still don't know what caused the problem but I have created the missing folders in the path and tmp files started showing up. I am able to build without any problems now.

Gokce
  • 1
  • 1