如何将 MonoTouch.ObjCRuntime.Class.ThrowOnInitFailure 设置为 false?

ste*_*eaw 5 xamarin.ios ios xamarin visual-studio-2013

我正在使用 Xamarin 并尝试在 iOS 模拟器中运行我的应用程序之一,但出现此错误:

2015-10-07 12:38:02.715 MolinaCoding1iOS[1550:54337] Unhandled managed exception:
Could not initialize an instance of the type 'UIKit.UIImage': the native 'initWithContentsOfFile:' method returned nil.
It is possible to ignore this condition by setting MonoTouch.ObjCRuntime.Class.ThrowOnInitFailure to false. (System.Exception)
Run Code Online (Sandbox Code Playgroud)

我如何真正忽略这种情况?如果我不应该忽略这一点……那我该怎么办?

谢谢

Ton*_*oei 5

我通过在我的项目上运行“Clean”(使用 Visual Studio)解决了这个问题。右键单击您的项目并选择“清理”。之后运行应用程序。