【问题标题】:Unity IL2CPP Build Error `DirectoryNotFoundException`Unity IL2CPP 构建错误`DirectoryNotFoundException`
【发布时间】:2021-06-04 21:35:19
【问题描述】:

这是我在这里的第一个问题,我对开发真的很陌生。所以我希望我能得到帮助来解决这个我几天都无法解决的问题。当我尝试为 IL2CPP 构建时出现以下错误:

DirectoryNotFoundException:找不到路径“C:\Users\Public\Documents\Wondershare\CreatorTemp\tmp517a91d3.tmp”的一部分。 System.IO.FileStream..ctor(System.String 路径、System.IO.FileMode 模式、System.IO.FileAccess 访问、System.IO.FileShare 共享、System.Int32 bufferSize、System.Boolean 匿名、System.IO.FileOptions选项)(在 :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 () (在 :0) UnityEditor.MonoAssemblyStripping.GenerateLinkXmlToPreserveDerivedTypes(System.String 库文件夹,UnityEditor.RuntimeClassRegistry usedClasses)(在 :0) UnityEditorInternal.AssemblyStripper.RunAssemblyStripper (UnityEditorInternal.UnityLinkerRunInformation runInformation) (在 :0) UnityEditorInternal.AssemblyStripper.StripAssemblies(System.String managedAssemblyFolderPath,UnityEditorInternal.BaseUnityLinkerPlatformProvider unityLinkerPlatformProvider,UnityEditorInternal.IIl2CppPlatformProvider il2cppPlatformProvider,UnityEditor.RuntimeClassRegistry RCR,UnityEditor.ManagedStrippingLevel managedStrippingLevel)(在:0) UnityEditorInternal.IL2CPPBuilder.Run () (在 :0) UnityEditorInternal.IL2CPPUtils.RunIl2Cpp (System.String tempFolder, System.String stagingAreaData, UnityEditorInternal.IIl2CppPlatformProvider platformProvider, System.Action`1[T] modifyOutputBeforeCompile, UnityEditor.RuntimeClassRegistry runtimeClassRegistry) (at :0) UnityEditor.Android.PostProcessor.Tasks.RunIl2Cpp.Execute(UnityEditor.Android.PostProcessor.PostProcessorContext 上下文)(在 :0) UnityEditor.Android.PostProcessor.PostProcessRunner.RunAllTask​​s(UnityEditor.Android.PostProcessor.PostProcessorContext 上下文)(在 :0) UnityEditor.Android.PostProcessAndroidPlayer.PostProcess(UnityEditor.BuildTarget 目标,System.String stagingAreaData,System.String stagingArea,System.String playerPackage,System.String installPath,System.String companyName,System.String productName,UnityEditor.BuildOptions 选项,UnityEditor。 RuntimeClassRegistry usedClassRegistry, UnityEditor.Build.Reporting.BuildReport 报告)(在 :0) UnityEditor.Android.AndroidBuildPostprocessor.PostProcess(UnityEditor.Modules.BuildPostProcessArgs args,UnityEditor.BuildProperties& outProperties)(在 :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 报告)(在 :0) UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr, Boolean&)

此错误仅在使用 IL2CPP 构建时发生并且即使在新项目中也持续存在。在我将“facebook sdk for unity”添加到我的项目、解决依赖关系并更改系统变量之后,它开始发生。所以这是我迄今为止尝试过的:

-删除了 facebook sdk 并更改了一些与之相关的依赖项。 - 删除了我添加的系统变量 (https://answers.unity.com/questions/616484/open-ssl-not-found.html)。 - 从电脑中删除了与 Wondershare 相关的文件夹。 - 清除了我的用户中的 .gradle 文件夹。 -删除了我项目中的库和临时文件夹。 -重新安装了android的构建工具(与unity一起安装)。

我不确定我是否越界,任何帮助将不胜感激。

【问题讨论】:

标签: unity3d il2cpp


【解决方案1】:

我仍然不知道是什么导致了问题,但我在路径中创建了丢失的文件夹,并且 tmp 文件开始出现。我现在可以毫无问题地构建了。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2021-04-18
    • 2021-03-01
    • 2020-05-09
    • 2020-02-13
    • 1970-01-01
    • 2017-06-20
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多