2016-11-14 27 views
1

構建Xamarin.Forms應用到iOS上,我得到以下錯誤無法編譯生成的註冊商代碼 - MT4109

/Library/Frameworks/Mono.framework/External/xbuild/Xamarin/iOS/Xamarin.iOS.Common.targets (_CompileToNative target) -> 

MTOUCH: error MT4109: Failed to compile the generated registrar code. Please file a bug report at http://bugzilla.xamarin.com 

6 Warning(s) 
1 Error(s) 

已用時間00:00:51.5040280

obj/iPhone/Debug/build-iphone8.1-10.1.1/mtouch-cache/registrar.m:6806:74: error: expected a type 
      -(BOOL) gestureRecognizer:(UIGestureRecognizer *)p0 shouldReceivePress:(UIPress *)p1; 
                        ^
    /obj/iPhone/Debug/build-iphone8.1-10.1.1/mtouch-cache/registrar.m:6848:74: error: expected a type 
      -(BOOL) gestureRecognizer:(UIGestureRecognizer *)p0 shouldReceivePress:(UIPress *)p1 
                        ^
    obj/iPhone/Debug/build-iphone8.1-10.1.1/mtouch-cache/registrar.m:6851:10: error: no matching function for call to 'native_to_managed_trampoline_37' 
        return native_to_managed_trampoline_37 (self, _cmd, &managed_method, p0, p1, "UIKit.UIGestureRecognizer, Xamarin.iOS", "UIKit.UIPress, Xamarin.iOS", "UIKit.UIGestureRecognizer+_UIGestureRecognizerDelegate, Xamarin.iOS", "ShouldReceivePress"); 

obj/iPhone/Debug/build-iphone8.1-10.1.1/mtouch-cache/registrar.m:1705:13: note: candidate function not viable: no known conversion from 'id' to 'int *' for 5th argument 
    static BOOL native_to_managed_trampoline_37 (id self, SEL _cmd, MonoMethod **managed_method_ptr, UIGestureRecognizer * p0, UIPress * p1, const char *r0, const char *r1, const char *r2, const char *r3) 
       ^
    4 errors generated. 

其中僅發生當試圖部署到物理設備時,在模擬器上一切正常。

回答

1

今天我得到了同樣的錯誤。我以前有過XCode 7.0.1,看起來UIPress類是在iOS 9.2之後引入的,並沒有與XCode 7.0.1一起提供。所以我剛剛升級了我的XCode,解決了問題。