Xamarin无法解析“System.Void Foundation.NSMutableDictionary

时间:2015-10-23 09:42:13

标签: xamarin xamarin.ios

刚刚在我的Mac上更新到最新的Xamarin.iOS稳定版和Xcode 7.1。当我为模拟器和设备构建Visual Studio时,我收到以下错误:

错误22无法解析“System.Void Foundation.NSMutableDictionary :: set_Item(ObjCRuntime.INativeObject,ObjCRuntime.INativeObject)”引用自“Xamarin.iOS,Version = 0.0.0.0,Culture = neutral,PublicKeyToken = 84e04ff9cfb79065”< / p>

[UPDATE] 当我将链接行为设置为“关闭”时,应用程序会在模拟器和设备上启动,但崩溃时会出现以下错误:

Error loading /System/Library/Extensions/IOHIDFamily.kext/Contents/PlugIns/IOHIDLib.plugin/Contents/MacOS/IOHIDLib:  dlopen(/System/Library/Extensions/IOHIDFamily.kext/Contents/PlugIns/IOHIDLib.plugin/Contents/MacOS/IOHIDLib, 262): no suitable image found.  Did find:
/System/Library/Extensions/IOHIDFamily.kext/Contents/PlugIns/IOHIDLib.plugin/Contents/MacOS/IOHIDLib: mach-o, but not built for iOS simulator

Cannot find function pointer IOHIDLibFactory for factory 13AA9C44-6F1B-11D4-907C-0005028F18D5 in CFBundle/CFPlugIn 0x7d2c2e80 </System/Library/Extensions/IOHIDFamily.kext/Contents/PlugIns/IOHIDLib.plugin> (bundle, not loaded) 2015-10-23 15:05:28.036 

 Error loading /System/Library/Extensions/IOHIDFamily.kext/Contents/PlugIns/IOHIDLib.plugin/Contents/MacOS/IOHIDLib:  dlopen(/System/Library/Extensions/IOHIDFamily.kext/Contents/PlugIns/IOHIDLib.plugin/Contents/MacOS/IOHIDLib, 262): no suitable image found.  Did find:
/System/Library/Extensions/IOHIDFamily.kext/Contents/PlugIns/IOHIDLib.plugin/Contents/MacOS/IOHIDLib: mach-o, but not built for iOS simulator

 Cannot find function pointer IOHIDLibFactory for factory 13AA9C44-6F1B-11D4-907C-0005028F18D5 in CFBundle/CFPlugIn 0x7d2c2e80 </System/Library/Extensions/IOHIDFamily.kext/Contents/PlugIns/IOHIDLib.plugin> (bundle, not loaded)

我设法将问题缩小到应用正在使用的相机,直到下线:

var dictionary = new NSMutableDictionary();
dictionary[AVVideo.CodecKey] = new NSNumber((int)AVVideoCodec.JPEG);

错误是

[0:] Method 'NSMutableDictionary.set_Item' not found.
Attempting to JIT compile method ... while running with --aot-only. 
See http://docs.xamarin.com/ios/about/limitations for more information.

在我更新到XCode 7.1之前,这已经过去了。

知道如何解决这个问题吗?

谢谢!

1 个答案:

答案 0 :(得分:0)