首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >由于某种原因,我得到了IL2CPP构建错误

由于某种原因,我得到了IL2CPP构建错误
EN

Stack Overflow用户
提问于 2021-12-31 13:35:09
回答 2查看 2K关注 0票数 0

出于某种原因,我得到了构建错误。我能够清楚地用mono构建我的项目。我现在正试图用IL2CPP构建这个项目,并得到了一些错误。

我试过:

  • 将Windows语言转换为英语。事实上,我重新安装了Windows 11.
  • 并重新安装了

、Visual和sdk、ndk等。

顺便说一下,错误是关于compile.rsp文件的文件路径。我手动检查了文件路径和文件。它存在于正确的文件位置。

下面是错误和控制台消息。

错误1:

代码语言:javascript
复制
Internal build system error. BuildProgram exited with code -2147024893.
System.IO.DirectoryNotFoundException: Could not find a part of the path 'D:\Program Files\Unity\Hub\Editor\2021.2.7f1\Editor\Data\PlaybackEngines\AndroidPlayer\Variations\il2cpp\Release\StaticLibs\armeabi-v7a\compile.rsp'.
   at System.IO.FileStream.ValidateFileHandle(SafeFileHandle fileHandle)
   at System.IO.FileStream.CreateFileOpenHandle(FileMode mode, FileShare share, FileOptions options)
   at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options)
   at System.IO.StreamReader.ValidateArgsAndOpenPath(String path, Encoding encoding, Int32 bufferSize)
   at System.IO.StreamReader..ctor(String path, Encoding encoding, Boolean detectEncodingFromByteOrderMarks)
   at System.IO.File.InternalReadAllText(String path, Encoding encoding)
   at System.IO.File.ReadAllText(String path)
   at NiceIO.NPath.SystemIOFileSystem.File_ReadAllText(NPath path)
   at NiceIO.NPath.WindowsFileSystem.File_ReadAllText(NPath path)
   at Bee.Core.Stevedore.VirtualFileSystem.File_ReadAllText(NPath path)
   at NiceIO.NPath.RelayingFileSystem.File_ReadAllText(NPath path)
   at Bee.Core.BuildProgramFileSystem.File_ReadAllText(NPath path)
   at NiceIO.NPath.ReadAllText()
   at AndroidPlayerBuildProgram.AndroidPlayerBuildProgram.SetupCompile(AndroidSharedLibraryConfiguration config, String name, AndroidTargetDeviceType deviceType, NPath sourceFilePath)
   at AndroidPlayerBuildProgram.AndroidPlayerBuildProgram.SetupLibUnityLibrary()+MoveNext()
   at System.Collections.Generic.List`1.InsertRange(Int32 index, IEnumerable`1 collection)
   at System.Collections.Generic.List`1.AddRange(IEnumerable`1 collection)
   at AndroidPlayerBuildProgram.AndroidPlayerBuildProgram.SetupPlayerBuild()
   at PlayerBuildProgramLibrary.PlayerBuildProgramBase.RunBuildProgram()
   at PlayerBuildProgramTypeWrapper.Run(String[] args)
   at Program.Main(String[] args)
UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)

错误2:

代码语言:javascript
复制
BuildFailedException: Incremental Player build failed!
UnityEditor.Modules.BeeBuildPostprocessor.PostProcess (UnityEditor.Modules.BuildPostProcessArgs args) (at <0cde216a590a4d6fbc3d7db7ac203c5d>:0)
UnityEditor.Modules.DefaultBuildPostprocessor.PostProcess (UnityEditor.Modules.BuildPostProcessArgs args, UnityEditor.BuildProperties& outProperties) (at <0cde216a590a4d6fbc3d7db7ac203c5d>:0)
UnityEditor.Android.AndroidBuildPostprocessor.PostProcess (UnityEditor.Modules.BuildPostProcessArgs args, UnityEditor.BuildProperties& outProperties) (at <374d68101b9e4829844c8329406f32cc>:0)
UnityEditor.PostprocessBuildPlayer.Postprocess (UnityEditor.BuildTargetGroup targetGroup, UnityEditor.BuildTarget target, System.Int32 subtarget, 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 <0cde216a590a4d6fbc3d7db7ac203c5d>:0)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr, Boolean&)
EN

回答 2

Stack Overflow用户

发布于 2022-01-01 18:44:12

我终于解决了我的问题。

两件你必须确信的事

  1. 将您的窗口显示语言设置为英文
  2. ,将统一版本从2021.2更改为2020.3

这两样东西很可能像我的一样解决你的问题。

票数 0
EN

Stack Overflow用户

发布于 2022-01-30 16:40:44

如果给出的答案没有帮助,我发现错误的另一个可能原因是:大型值数组(超过10k元素)不能被IL2CPP专门处理。不知道为什么-如何,它只是提到在一个线程在团结论坛,它确实解决了我的问题-我只是删除了文本文件中的所有值,并在启动时进行了分析。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/70542826

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档