gpt4 book ai didi

c# - 调试 Xamarin C# iOS App 时抛出 Objective_C 异常

转载 作者:行者123 更新时间:2023-11-29 00:16:23 26 4
gpt4 key购买 nike

当我开始构建和调试我的 iOS 应用程序时,模拟器会运行,但我会抛出异常并且模拟器不会打开。我使用的是 Visual Studio for Mac。

错误是:

Objective-C exception thrown.Name: NSInvalidArgumentException Reason:  
Could not find a storyboard named 'Main' in bundle NSBundle
</Users/(Username
here)/Library/Developer/CoreSimulator/Devices/23E98CA3-FC40-4AA4-8AAD-
62A9FADE1118/data/Containers/Bundle/Application/715B09C7-FBF2-41E6-
8FCD-A6329DE9E758/(AppName Here).app> (loaded)
Native stack trace:
0 CoreFoundation 0x0000000108f31b0b
__exceptionPreprocess + 171
1 libobjc.A.dylib 0x0000000113b0e141
objc_exception_throw + 48
2 UIKit 0x000000010d005cfb +
[UIStoryboard storyboardWithName:bundle:] + 663
3 UIKit 0x000000010c84590d -
[UIApplication _loadMainStoryboardFileNamed:bundle:] + 72
4 UIKit 0x000000010c845e13 -
[UIApplication _loadMainInterfaceFile] + 260
5 UIKit 0x000000010c8444b6 -
[UIApplication _runWithMainScene:transitionContext:completion:] + 1407
6 UIKit 0x000000010c8417f3 -
[UIApplication workspaceDidEndTransaction:] + 182
7 FrontBoardServices 0x00000001168265f6
__FBSSERIALQUEUE_IS_CALLING_OUT_TO_A_BLOCK__ + 24
8 FrontBoardServices 0x000000011682646d -
[FBSSerialQueue _performNext] + 186
9 FrontBoardServices 0x00000001168267f6 -
[FBSSerialQueue _performNextFromRunLoopSource] + 45
10 CoreFoundation 0x0000000108ed7c01
__CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17
11 CoreFoundation 0x0000000108ebd0cf
__CFRunLoopDoSources0 + 527
12 CoreFoundation 0x0000000108ebc5ff
__CFRunLoopRun + 911
13 CoreFoundation 0x0000000108ebc016
CFRunLoopRunSpecific + 406
14 UIKit 0x000000010c84008f -
[UIApplication _run] + 468
15 UIKit 0x000000010c846134
UIApplicationMain + 159
16 ??? 0x000000012bee336c 0x0 +
5031998316
17 ??? 0x0000000128fc6abd 0x0 +
4982598333

谢谢,Z

编辑:

正在添加图片。

Info.plist

最佳答案

您的项目中似乎找不到 main.storyboard。检查这个pic

如果主界面是 Main ,请检查您的项目中是否存在 main.storyboard。或者您可以将其更改为其他 viewController。

关于c# - 调试 Xamarin C# iOS App 时抛出 Objective_C 异常,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45227222/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com