繁体   English   中英

Xamarin IOS:在捆绑包NSBundle中找不到名为“ Main”的故事板

[英]Xamarin IOS: Could not find a storyboard named 'Main' in bundle NSBundle

我试图通过macOS上的Visual Studio社区运行Xamarin.IOS应用程序,但在初始屏幕上(在模拟器和物理设备上)遇到以下异常。 以前可以使用,但是在进行更改(可以使用)并喝咖啡休息后,下一次我构建它时停止了工作。 主存储库没有VCS差异,对同事而言运行良好。

 Objective-C exception thrown. Name: NSInvalidArgumentException Reason: Could not find a storyboard named 'Main' in bundle NSBundle </Users/User/Library/Developer/CoreSimulator/Devices/3AD1FBAC-EA67-4CC0-8D8D-212DA5429B51/data/Containers/Bundle/Application/7D30F8AC-D3A4-46FA-AA22-8EA50F1ABA43/Test.app> (loaded) Native stack trace: 0 CoreFoundation 0x000000011bc371bb __exceptionPreprocess + 331 1 libobjc.A.dylib 0x000000011cc18735 objc_exception_throw + 48 2 UIKitCore 0x000000012312e27a +[UIStoryboard storyboardWithName:bundle:] + 676 3 UIKitCore 0x0000000122f8d016 -[UIApplication _loadMainStoryboardFileNamed:bundle:] + 76 4 UIKitCore 0x0000000122f8d50c -[UIApplication _loadMainInterfaceFile] + 272 5 UIKitCore 0x0000000122f8bb25 -[UIApplication _runWithMainScene:transitionContext:completion:] + 1357 6 UIKitCore 0x00000001227aa4e9 __111-[__UICanvasLifecycleMonitor_Compatability _scheduleFirstCommitForScene:transition:firstActivation:completion:]_block_invoke + 866 7 UIKitCore 0x00000001227b329c +[_UICanvas _enqueuePostSettingUpdateTransactionBlock:] + 153 8 UIKitCore 0x00000001227aa126 -[__UICanvasLifecycleMonitor_Compatability _scheduleFirstCommitForScene:transition:firstActivation:completion:] + 233 9 UIKitCore 0x00000001227aaae0 -[__UICanvasLifecycleMonitor_Compatability activateEventsOnly:withContext:completion:] + 1085 10 UIKitCore 0x00000001227a8cb5 __82-[_UIApplicationCanvas _transitionLifecycleStateWithTransitionContext:completion:]_block_invoke + 795 11 UIKitCore 0x00000001227a895f -[_UIApplicationCanvas _transitionLifecycleStateWithTransitionContext:completion:] + 435 12 UIKitCore 0x00000001227ada90 __125-[_UICanvasLifecycleSettingsDiffAction performActionsForCanvas:withUpdatedScene:settingsDiff:fromSettings:transitionContext:]_block_invoke + 584 13 UIKitCore 0x00000001227ae80e _performActionsWithDelayForTransitionContext + 100 14 UIKitCore 0x00000001227ad7ef -[_UICanvasLifecycleSettingsDiffAction performActionsForCanvas:withUpdatedScene:settingsDiff:fromSettings:transitionContext:] + 221 15 UIKitCore 0x00000001227b293a -[_UICanvas scene:didUpdateWithDiff:transitionContext:completion:] + 392 16 UIKitCore 0x0000000122f8a44e -[UIApplication workspace:didCreateScene:withTransitionContext:completion:] + 515 17 UIKitCore 0x0000000122b2ed09 -[UIApplicationSceneClientAgent scene:didInitializeWithEvent:completion:] + 357 18 FrontBoardServices 0x000000011e76a2da -[FBSSceneImpl _didCreateWithTransitionContext:completion:] + 448 19 FrontBoardServices 0x000000011e775443 __56-[FBSWorkspace client:handleCreateScene:withCompletion:]_block_invoke_2 + 271 20 FrontBoardServices 0x000000011e774b3a __40-[FBSWorkspace _performDelegateCallOut:]_block_invoke + 53 21 libdispatch.dylib 0x000000011df3a54b _dispatch_client_callout + 8 22 libdispatch.dylib 0x000000011df3d60b _dispatch_block_invoke_direct + 312 23 FrontBoardServices 0x000000011e7a9ba8 __FBSSERIALQUEUE_IS_CALLING_OUT_TO_A_BLOCK__ + 30 24 FrontBoardServices 0x000000011e7a9860 -[FBSSerialQueue _performNext] + 457 25 FrontBoardServices 0x000000011e7a9e40 -[FBSSerialQueue _performNextFromRunLoopSource] + 45 26 CoreFoundation 0x000000011bb9c721 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17 27 CoreFoundation 0x000000011bb9bf93 __CFRunLoopDoSources0 + 243 28 CoreFoundation 0x000000011bb9663f __CFRunLoopRun + 1263 29 CoreFoundation 0x000000011bb95e11 CFRunLoopRunSpecific + 625 30 GraphicsServices 0x000000011fdf51dd GSEventRunModal + 62 31 UIKitCore 0x0000000122f8d81d UIApplicationMain + 140 32 ??? 0x0000000187cb6bce 0x0 + 6573222862 33 ??? 0x0000000187cb6963 0x0 + 6573222243 

我一直在搜索,发现了一些可能解决此问题的方法,但没有一个起作用。 我试过了:

请注意,对这些步骤中的每个步骤都进行了干净+重建。 我还验证了Main.storyboard处于“复制捆绑资源”构建阶段,将我的存储库克隆到一个单独的目录中,完全重新安装了Visual Studio(以及下载的框架),以及我做过的许多其他事情偶然发现周围。 没运气。

值得注意的是,默认的Xamarin.IOS项目确实可以在我的机器上运行,但是不能解释为什么该项目只能在我的机器上无法运行,而可以在其他机器上运行。

嗨,您是否检查了info.plist中添加的Main.storyboard

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM