如何解决Xamarin Forms UWP 在启动时崩溃
GLLDBG 权限检查成功 ...
GLLDBG:PetUI 显示 C:\Users\india\AppData\Local\Packages\0c046c82-7c9c-41e1-b7aa-0c1798833708_1d3xttr4xanc4\LocalState\photos\img676e113a6a2a9d4
抛出异常:System.Private.CoreLib.dll 中的“System.ArgumentNullException” 在 PetDiary.UWP.exe 中的 0x76EAA892 (KernelBase.dll) 处引发异常:WinRT 起源错误 - 0x80004003:'System.ArgumentNullException:值不能为空。 在 Xamarin.Forms.Platform.UWP.Platform.SetCurrent(Page newPage,Boolean popping,Boolean modal,Action completedCallback) 在 System.Runtime.CompilerServices.AsyncmethodBuilderCore.c.b__7_0(对象状态) 在 System.Threading.WinRTSynchronizationContextBase.Invoker.InvokeCore()'。 onecore\com\combase\winrt\error\restrictederror.cpp(1016)\combase.dll!768325F0: (caller: 76795156) ReturnHr(1) tid(771c) 8007007E 找不到指定的模块。 在 PetDiary.UWP.exe 中的 0x76EAA892 (KernelBase.dll) 处引发异常:WinRT 起源错误 - 0x80004003:“值不能为空。”。 onecore\com\combase\winrt\error\restrictederror.cpp(1016)\combase.dll!768325F0: (caller: 76795156) ReturnHr(2) tid(771c) 8007007E 找不到指定的模块。
崩溃以生成的 InitializeComponent 函数中的 UnhandledException“处理程序”结束
public void InitializeComponent()
{
if (_contentLoaded)
return;
_contentLoaded = true;
DebugSettings.BindingFailed += (sender,args) =>
{
global::System.Diagnostics.Debug.WriteLine(args.Message);
};
UnhandledException += (sender,e) =>
{
if (global::System.Diagnostics.Debugger.IsAttached)
global::System.Diagnostics.Debugger.Break(); // <--- CRASH HERE!
};
有什么想法吗?这看起来很熟悉吗? UWP 是我存在的祸根...(我删除了 #if/#endif 因为格式化程序抱怨)
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。