gpt4 book ai didi

android - Xamarin 表格 : iOS Linking

转载 作者:行者123 更新时间:2023-11-28 23:32:28 25 4
gpt4 key购买 nike

我正在尝试在 Xamarin Forms 应用程序中启用“Link All”。它已在 Android 中成功完成。但是对于 iOS 版本我遇到运行时错误。

应用程序刚刚启动并崩溃。

iOSMain.csUIApplication.Main (args, null, "AppDelegate");

我该如何解决这个问题?

附上崩溃日志。

Foundation.MonoTouchException has been thrown

Objective-C exception thrown. Name: NSInternalInconsistencyException Reason: Application windows are expected to have a root view controller at the end of application launch Native stack trace: 0
CoreFoundation 0x000000010cf3c1bb exceptionPreprocess + 331 1 libobjc.A.dylib 0x000000010dec2735 objc_exception_throw + 48 2 CoreFoundation
0x000000010cf3bf42 +[NSException raise:format:arguments:] + 98 3
Foundation 0x000000010c0f5877 -[NSAssertionHandler handleFailureInMethod:object:file:lineNumber:description:] + 194 4
UIKitCore 0x00000001162c217a -[UIApplication _runWithMainScene:transitionContext:completion:] + 2978 5 UIKitCore 0x0000000115ae04e9 __111-[__UICanvasLifecycleMonitor_Compatability _scheduleFirstCommitForScene:transition:firstActivation:completion:]_block_invoke + 866 6 UIKitCore 0x0000000115ae929c +[_UICanvas _enqueuePostSettingUpdateTransactionBlock:] + 153 7 UIKitCore 0x0000000115ae0126 -[__UICanvasLifecycleMonitor_Compatability _scheduleFirstCommitForScene:transition:firstActivation:completion:] + 233 8 UIKitCore 0x0000000115ae0ae0 -[__UICanvasLifecycleMonitor_Compatability activateEventsOnly:withContext:completion:] + 1085 9 UIKitCore
0x0000000115adecb5 __82-[_UIApplicationCanvas _transitionLifecycleStateWithTransitionContext:completion:]_block_invoke + 795 10 UIKitCore 0x0000000115ade95f -[_UIApplicationCanvas _transitionLifecycleStateWithTransitionContext:completion:] + 435 11 UIKitCore 0x0000000115ae3a90 __125-[_UICanvasLifecycleSettingsDiffAction performActionsForCanvas:withUpdatedScene:settingsDiff:fromSettings:transitionContext:]_block_invoke + 584 12 UIKitCore 0x0000000115ae480e _performActionsWithDelayForTransitionContext + 100 13 UIKitCore 0x0000000115ae37ef -[_UICanvasLifecycleSettingsDiffAction performActionsForCanvas:withUpdatedScene:settingsDiff:fromSettings:transitionContext:] + 221 14 UIKitCore 0x0000000115ae893a -[_UICanvas scene:didUpdateWithDiff:transitionContext:completion:] + 392 15 UIKitCore 0x00000001162c044e -[UIApplication workspace:didCreateScene:withTransitionContext:completion:] + 515 16 UIKitCore 0x0000000115e64d09 -[UIApplicationSceneClientAgent scene:didInitializeWithEvent:completion:] + 357 17 FrontBoardServices 0x00000001119552da -[FBSSceneImpl _didCreateWithTransitionContext:completion:] + 448 18 FrontBoardServices 0x0000000111960443 __56-[FBSWorkspace client:handleCreateScene:withCompletion:]_block_invoke_2 + 271 19 FrontBoardServices 0x000000011195fb3a __40-[FBSWorkspace _performDelegateCallOut:]_block_invoke + 53 20 libdispatch.dylib 0x000000010f3dc54b _dispatch_client_callout + 8 21 libdispatch.dylib 0x000000010f3df60b _dispatch_block_invoke_direct + 312 22 FrontBoardServices 0x0000000111994ba8 __FBSSERIALQUEUE_IS_CALLING_OUT_TO_A_BLOCK
+ 30 23 FrontBoardServices 0x0000000111994860 -[FBSSerialQueue _performNext] + 457 24 FrontBoardServices 0x0000000111994e40 -[FBSSerialQueue _performNextFromRunLoopSource] + 45 25 CoreFoundation 0x000000010cea1721 CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION + 17 26 CoreFoundation 0x000000010cea0f93 __CFRunLoopDoSources0 + 243 27 CoreFoundation 0x000000010ce9b63f __CFRunLoopRun + 1263 28 CoreFoundation
0x000000010ce9ae11 CFRunLoopRunSpecific + 625 29 GraphicsServices
0x0000000111bb91dd GSEventRunModal + 62 30 UIKitCore
0x00000001162c381d UIApplicationMain + 140 31 ???
0x000000012cb7629e 0x0 + 5045183134 32 ???
0x000000012cb76033 0x0 + 5045182515

最佳答案

我正在使用Link all assemblies而不是Link SDK assemblies only来减少APK/IPA文件的大小。

对于 iOS 和 Android 来说,它减少了大约 20MB。

对于 iOS,我必须在所有 dependency service 实现中添加 [Preserve(AllMembers = true)]。现在一切正常。

关于android - Xamarin 表格 : iOS Linking,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56014542/

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