首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >未处理的异常: System.FormatException:在虚拟引擎4.23上启动iphone时输入字符串格式不正确

未处理的异常: System.FormatException:在虚拟引擎4.23上启动iphone时输入字符串格式不正确
EN

Stack Overflow用户
提问于 2019-09-20 15:43:09
回答 1查看 4K关注 0票数 0

在遵循了几个关于启动ios的指南之后,我仍然无法让它正常工作。我尝试了一个空的项目,ar试剂盒样本和面ar样本都没有效果。这是我正在犯的错误:

LogPlayLevel:构建命令启动LogPlayLevel:已完成的启动阶段:构建任务,时间: 5.581737 Games/UE_4.23/Engine/Binaries/DotNET/UnrealBuildTool.exe“:LogPlayLevel: mono :mono/LogPlayLevel/Shared/Epic LogPlayLevel AR IOS开发-Project=/Users/dondoo/Desktop/AR/AR.uproject /LogPlayLevel/dondoo/Desktop/AR/ar.uproject -NoUBTMakefiles -remoteini=”/User/dondoo/Desktop/AR“-skipdeploy -ini:Game:/Script/UnrealEd.ProjectPackagingSettings:BlueprintNativizationMethod=Di sabled -Manifest=/Users/dondoo/Desktop/AR/Intermediate/Build/Manifest.xml -NoHotReload -log=/Users/dondoo/Library/Logs/Unreal Engine/LocalBuildLogs/UBT-AR-IOS-Development.txt“LogPlayLevel:在运行时允许对操作系统版本12.0进行编译:错误:错误:未处理的异常: System.FormatException:输入字符串格式不正确。LogPlayLevel: System.Number.ThrowOverflowOrFormatException (System.Boolean overflow,System.String overflowResourceKey) 0x0001a in :0 LogPlayLevel: at System.Number.ParseSingle (System.ReadOnlySpan1[T] value, System.Globalization.NumberStyles styles, System.Globalization.NumberFormatInfo info) [0x00071] in :0 LogPlayLevel: at System.Single.Parse (System.String s) [0x0001a] in :0 LogPlayLevel: at UnrealBuildTool.ReadOnlyIOSTargetRules.get_RuntimeVersion () [0x00010] in :0 LogPlayLevel: at UnrealBuildTool.IOSPlatform.SetUpEnvironment (UnrealBuildTool.ReadOnlyTargetRules Target, UnrealBuildTool.CppCompileEnvironment CompileEnvironment, UnrealBuildTool.LinkEnvironment LinkEnvironment) [0x00226] in :0 LogPlayLevel: at UnrealBuildTool.UEBuildTarget.SetupGlobalEnvironment (UnrealBuildTool.UEToolChain ToolChain, UnrealBuildTool.CppCompileEnvironment GlobalCompileEnvironment, UnrealBuildTool.LinkEnvironment GlobalLinkEnvironment) [0x00bc8] in :0 LogPlayLevel: at UnrealBuildTool.UEBuildTarget.Build (UnrealBuildTool.BuildConfiguration BuildConfiguration, UnrealBuildTool.ISourceFileWorkingSet WorkingSet, System.Boolean bIsAssemblingBuild, Tools.DotNETCommon.FileReference SingleFileToCompile) [0x00061] in :0 LogPlayLevel: at UnrealBuildTool.BuildMode.CreateMakefile (UnrealBuildTool.BuildConfiguration BuildConfiguration, UnrealBuildTool.TargetDescriptor TargetDescriptor, UnrealBuildTool.ISourceFileWorkingSet WorkingSet) [0x00141] in :0 LogPlayLevel: at UnrealBuildTool.BuildMode.Build (System.Collections.Generic.List1T TargetDescriptors,UnrealBuildTool.BuildConfiguration BuildConfiguration,UnrealBuildTool.ISourceFileWorkingSet WorkingSet,UnrealBuildTool.BuildOptions Options,Tools.DotNETCommon.FileReference WriteOutdatedActionsFile) 0x0001a in :0 Tools.DotNETCommon.FileReference: at WriteOutdatedActionsFile(System.Boolean) 0x002cc in :0 (en23#) 0x00291 in :0 in:0 s运行mono,en26#:#en27失败。有关详细信息,请参阅日志。(/User/dondoo/Library/Logs/Unreal Engine/LocalBuildLogs/UBT-AR-IOS-Development.txt) LogPlayLevel: AutomationTool exiting with ExitCode=5 (5) LogPlayLevel: Completed Stage On Stage: Build Task,Time: 29.662970 LogPlayLevel: Error: RunUAT ERROR: AutomationTool无法成功运行。PackagingResults:错误:启动失败!未知误差

我有一个有效的配置文件、证书和苹果开发人员帐户,正在开发一个macbook,试图推出iphone。

EN

回答 1

Stack Overflow用户

发布于 2019-09-27 11:36:52

导致错误的原因是将ios版本从字符串转换为浮点,而忽略了语言区域设置。"11.0“点(”.“)是问题所在

ue4_23_0\Engine\Source\Programs\UnrealBuildTool\Platform\IOS\UEBuildIOS.cs

代码语言:javascript
复制
...
//line 143
public float RuntimeVersion
{
    get { return float.Parse(Inner.ProjectSettings.RuntimeVersion); }
}
...
//line 368
public virtual string RuntimeVersion
{
    get
    {
        switch (MinimumIOSVersion)
        {
            case "IOS_11":
                return "11.0";
            case "IOS_12":
                return "12.0";
            default:
                return "11.0";
        }
    }
}
...

解决方案(非最佳)添加区域设置以进行解析

代码语言:javascript
复制
...
//line 10
using Microsoft.Win32;
using System.Globalization; // <- Add this
...
//line 143
public float RuntimeVersion
{
    get { return float.Parse(Inner.ProjectSettings.RuntimeVersion, CultureInfo.InvariantCulture.NumberFormat); }
}
...

或设置系统的区域设置以使用点(“.”)作为十进制分隔符

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

https://stackoverflow.com/questions/58031512

复制
相关文章

相似问题

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