我检索了有关我的应用程序的崩溃日志。
System.NullReferenceExceptionObject reference not set to an instance of an object
Raw TouristApp.PuntiEventiView.c__AnonStorey1.<>m__0()
Foundation.NSActionDispatcher.Apply()
UIKit.UIApplication.UIApplicationMain(int, string[], intptr, intptr)(wrapper managed-to-native)
UIKit.UIApplication.Main(string[] args, IntPtr principal, IntPtr delegate)
UIKit.UIApplication.Main(string[] args, string principalClassName, string delegateClassName)
TouristApp.Application.Main(string[] args)
我不知道这个错误,在我的类(class) (PuntiEventiView) 中没有调用 c__AnonStorey1.m(它似乎是一个 Mono 文件)。
有什么想法吗?
最佳答案
逐步调试您的应用程序。您在某处使用匿名委托(delegate)或 lambda,这会导致 NULL 引用异常。
c__AnonStorey1
是编译器生成的类,用于捕获局部变量。
(在这里使用我的 Crystal 球来猜测,因为你没有显示任何代码)
关于ios - Xamarin iOS c__AnonStorey1,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40124806/