【发布时间】:2023-02-08 01:12:10
【问题描述】:
我是 Unity 的新手,我正在尝试使用具有 vr 支持的 unity 构建 android 应用程序。我正在使用 Google VR 和纸板插件。 我最初能够构建该项目,但在我对场景进行了一些更改后,它在构建中显示错误。
第一个错误
DirectoryNotFoundException:找不到路径“/home/suhas/Unity Projects/ProjectRoom/Temp/StagingArea/assets/bin/Data/Managed/Temp/StagingArea/assets/bin/Data”的一部分。
System.IO.__Error.WinIOError (System.Int32 errorCode, System.String maybeFullPath) (at <695d1cc93cca45069c528c15c9fdd749>:0)
System.IO.FileSystemEnumerableIterator1[TSource].HandleError (System.Int32 hr, System.String path) (at <695d1cc93cca45069c528c15c9fdd749>:0) System.IO.FileSystemEnumerableIterator1[TSource].CommonInit () (在 <695d1cc93cca45069c528c15c9fdd749>:0)
System.IO.FileSystemEnumerableIterator1[TSource]..ctor (System.String path, System.String originalUserPath, System.String searchPattern, System.IO.SearchOption searchOption, System.IO.SearchResultHandler1[TSource] resultHandler, System.Boolean checkHost) (at <695d1cc93cca45069c528c15c9fdd749>:0)
System.IO.FileSystemEnumerableFactory.CreateFileNameIterator(System.String 路径,System.String originalUserPath,System.String searchPattern,System.Boolean includeFiles,System.Boolean includeDirs,System.IO.SearchOption searchOption,System.Boolean checkHost)(在 <695d1cc93cca45069c528c15c9fdd749> :0)
System.IO.Directory.InternalGetFileDirectoryNames(System.String 路径,System.String userPathOriginal,System.String searchPattern,System.Boolean includeFiles,System.Boolean includeDirs,System.IO.SearchOption searchOption,System.Boolean checkHost)(在 <695d1cc93cca45069c528c15c9fdd749> :0)
System.IO.Directory.InternalGetFiles(System.String 路径、System.String searchPattern、System.IO.SearchOption searchOption)(在 <695d1cc93cca45069c528c15c9fdd749>:0)
System.IO.Directory.GetFiles(System.String 路径、System.String searchPattern、System.IO.SearchOption searchOption)(位于 <695d1cc93cca45069c528c15c9fdd749>:0)
UnityEditor.Android.PostProcessor.Tasks.SplitLargeFiles.SplitFiles(System.String 路径,System.String 扩展名,System.Int32 阈值)(在:0)
UnityEditor.Android.PostProcessor.Tasks.SplitLargeFiles.Execute(UnityEditor.Android.PostProcessor.PostProcessorContext 上下文)(在:0)
UnityEditor.Android.PostProcessor.PostProcessRunner.RunAllTasks(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 公司名称,System.String 产品名称,UnityEditor.BuildOptions 选项,UnityEditor。 RuntimeClassRegistry usedClassRegistry, UnityEditor.Build.Reporting.BuildReport 报告) (at :0)
UnityEditor.Android.AndroidBuildPostprocessor.PostProcess (UnityEditor.Modules.BuildPostProcessArgs args, UnityEditor.BuildProperties& outProperties) (at :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 报告)(位于/home/bokken/buildslave/unity/build/Editor/Mono/BuildPipeline/PostprocessBuildPlayer.cs:337)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr, Boolean&) (at /home/bokken/buildslave/unity/build/Modules/IMGUI/GUIUtility.cs:189)
第二个错误
UnityEditor.BuildPlayerWindow+BuildMethodException:3 个错误 在 UnityEditor.BuildPlayerWindow+DefaultBuildMethods.BuildPlayer(UnityEditor.BuildPlayerOptions 选项)[0x002be] 在 /home/bokken/buildslave/unity/build/Editor/Mono/BuildPlayerWindowBuildMethods.cs:190 在 UnityEditor.BuildPlayerWindow.CallBuildMethods (System.Boolean askForBuildLocation, UnityEditor.BuildOptions defaultBuildOptions) [0x00080] 在 /home/bokken/buildslave/unity/build/Editor/Mono/BuildPlayerWindowBuildMethods.cs:95 UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&) (at /home/bokken/buildslave/unity/build/Modules/IMGUI/GUIUtility.cs:189)
过去两天我一直陷入这个错误。请帮忙。 谢谢。
【问题讨论】:
-
我要做的第一件事是退出 Unity,确保
/home/suhas/Unity Projects/ProjectRoom/Temp目录消失,然后重试。如果这不起作用,我会退出 Unity 和git clean -fdx以删除所有未提交的内容,然后重试。如果这不起作用,我会开始通过提交返回,直到我找到一个有效的然后比较头部以查看发生了什么变化并找出如何修复它。如果您不使用源代码管理,您应该开始,但删除项目中的库目录通常几乎与清理所有内容一样好。 -
感谢您的回复,我正在使用源代码管理。我试图改变以改变它起作用的不同变化。