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

标签 ios visual-studio-2013 xamarin xamarin.ios

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

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

谢谢

最佳答案

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

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

相关文章:

c# - LINQ 不适用于 Xamarin 中的字符串?

objective-c - 使用 UIPanGestureRecognizer 围绕某个点旋转 UIView

ios - 我已经有一个sprite sheet 图像,我怎样才能得到cocos2D 的plist 文件?

c# - datagridView 中的下拉菜单

c# - ExpectedException 属性无法显示预期结果 C#

android - MvxCommand 将 CommandParameter 绑定(bind)到字段

java - 无法使用 Visual Studio 2015 编辑 Xamarin .axml 布局文件

ios - 在 Swift 中使用 WriteValue 发送十六进制字符串

ios - 下载 PersistentConnectionLogging.zip

c++ - 为什么这个公共(public)成员函数不能在类内声明的私有(private)结构成员上调用 decltype?