OGeek|极客世界-中国程序员成长平台

标题: ios - 如何将 MonoTouch.ObjCRuntime.Class.ThrowOnInitFailure 设置为 false? [打印本页]

作者: 菜鸟教程小白    时间: 2022-12-12 09:14
标题: ios - 如何将 MonoTouch.ObjCRuntime.Class.ThrowOnInitFailure 设置为 false?

我正在使用 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)

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

谢谢



Best Answer-推荐答案


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

关于ios - 如何将 MonoTouch.ObjCRuntime.Class.ThrowOnInitFailure 设置为 false?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32999376/






欢迎光临 OGeek|极客世界-中国程序员成长平台 (http://ogeek.cn/) Powered by Discuz! X3.4