iOS black screen and MissingMethodException: Method not found: 'System.Type.op_Equality'

元气小坏坏 提交于 2019-12-08 07:17:27

问题


I'm starting to create an app using MvvmCross. So far I have an version for Android and for WP running. Unfortunately, creating the app for iOS isn't easy. When running the iOS-app in the simulator, I only get a black screen. In MonoDevelop's Application Output is see the following exception:

2013-01-07 10:42:20.506 BestSellersTouch[319:21e03] mvx: Diagnostic:   0.09 Exception masked MissingMethodException: Method not found: 'System.Type.op_Equality'.
  at Cirrious.MvvmCross.Touch.Views.Presenters.MvxTouchViewPresenter.CreateView (Cirrious.MvvmCross.Views.MvxShowViewModelRequest request) [0x00000] in <filename unknown>:0 
at Cirrious.MvvmCross.Touch.Views.Presenters.MvxTouchViewPresenter.Show (Cirrious.MvvmCross.Views.MvxShowViewModelRequest request) [0x00000] in <filename unknown>:0 
at Cirrious.MvvmCross.Touch.Views.MvxTouchViewDispatcher+<>c__DisplayClass4.<RequestNavigate>b__3 () [0x00000] in <filename unknown>:0 
at Cirrious.MvvmCross.Touch.Views.MvxTouchUIThreadDispatcher+<>c__DisplayClass1.<InvokeOrBeginInvoke>b__0 () [0x00000] in <filename unknown>:0 
2013-01-07 10:42:20.508 BestSellersTouch[319:21e03] Application windows are expected to have a root view controller at the end of application launch

Is this error causing a black screen?


回答1:


References to System.Type.op_Equality only exists when an assembly is compiled against mscorlib.dll 4.0 (and later).

Current version of MonoTouch does not support 4.0 (and that member is not part of the assembly) which result in this exception at runtime.

The solution, until MonoTouch supports 4.0 (this spring) is to rebuild the assembly and make sure it referenes the mscorlib.dll that ships with MonoTouch.

The fact that this exception is thrown while presenting a view is likely the reason of your black screen (nothing got executed to show anything on it).



来源:https://stackoverflow.com/questions/14193608/ios-black-screen-and-missingmethodexception-method-not-found-system-type-op-e

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!