gpt4 book ai didi

c# - 表单应用程序在 iOS 设备上出现启动画面后崩溃

转载 作者:塔克拉玛干 更新时间:2023-11-02 09:40:09 25 4
gpt4 key购买 nike

我有一个 Xamarin Forms 应用程序,它在 Android 和 iOS 模拟器上完美运行,但如果我尝试在 iOS 设备上部署它,它会在我看到第一个屏幕时崩溃。

有时它会在日志中写入 MT1107 错误,但有时不会

这是我的 iOS 设备日志: http://pastebin.com/uGp5K7Pg

最佳答案

检查您的 PasteBin 的第 70 行:

Sequence contains no elements (System.InvalidOperationException)
at System.Linq.Enumerable.Last[UIViewController] (IEnumerable`1 source) [0x00000] in <filename unknown>:0
at Xamarin.Forms.Platform.iOS.NavigationRenderer.<.ctor>b__0 (Xamarin.Forms.Platform.iOS.TabletMasterDetailRenderer sender) [0x00000] in <filename unknown>:0
at Xamarin.Forms.MessagingCenter+<>c__DisplayClass4`1[Xamarin.Forms.Platform.iOS.TabletMasterDetailRenderer].<Subscribe>b__3 (System.Object sender, System.Object args) [0x00000] in <filename unknown>:0

您似乎将 MasterDetailPage 包装到 NavigationPage 中。在 iOS(更具体地说:iPad)上,它使用 UISplitViewController,它不能嵌入到 UINavigationController 中。 Xamarin.Forms 会尽可能使用 native 控件。

尝试检查设备操作系统和习惯用法:如果您使用的是 iPad,请不要将 NavigationPage 包裹在您的页面中。

关于c# - 表单应用程序在 iOS 设备上出现启动画面后崩溃,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32227383/

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