gpt4 book ai didi

exception - Xamarin.Android 在异步方法中没有堆栈跟踪

转载 作者:行者123 更新时间:2023-12-02 03:23:41 26 4
gpt4 key购买 nike

任何人都可能找到了针对此错误的一些解决方法:

https://bugzilla.xamarin.com/show_bug.cgi?id=30513

?

它让我发疯......屏幕截图是我从异步方法中获得的异常报告。

enter image description here

最佳答案

这是另一个对我有用的解决方案。
只需在您的应用程序或主事件中添加此处理程序

AndroidEnvironment.UnhandledExceptionRaiser += delegate(object sender, RaiseThrowableEventArgs args){
typeof (System.Exception).GetField("stack_trace", BindingFlags.NonPublic | BindingFlags.Instance)
.SetValue(args.Exception, null);
throw args.Exception;
};

解释在上一篇文章 https://forums.xamarin.com/discussion/45219/stack-trace-not-captured-properly

关于exception - Xamarin.Android 在异步方法中没有堆栈跟踪,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31546805/

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