2011-04-07 88 views
1

有人使用優秀的Sparrow 2D monotouch庫嗎?升級到Monotouch 4.0後出現MissingMethodException

https://github.com/trustme/Sparrow

我剛剛更新到4.0的MonoTouch MonoDevelop的和2.4.2,當重建 和運行SparrowTest給我這個奇怪的錯誤:

System.MissingMethodException has been thrown "Method not found: 
'Monotouch.ObjCRuntime.Messaging.void_objc_msgSend_Boolean'." at 
SparrowTest.AppDelegateIPhone.FinishedLaunching in 
AppDelegateIPhone.cs:23 

的方法是:

SPStage.SupportHighResolutions = true; 

當評論時,它在許多其他方法上給出了相同的錯誤。我試過使用不同的sdk版本 ,但問題仍然存在。

任何線索?

回答

2

您需要btouch重新生成sparrow.dll對MonoTouch的4

+0

我試圖從存檔中包含的sparrow.cs中重新生成sparrow.dll。在我的終端中,我鍵入:/ Developer/MonoTouch/usr/bin/btouch -o sparrow.dll sparrow.cs但不幸的是它返回了一些錯誤:sparrow.cs(123,120):error CS0246:類型或命名空間名稱'SPHAlign'找不到。你是否缺少using指令或程序集引用? sparrow.cs(123,137):錯誤CS0246:無法找到類型或名稱空間名稱'SPVAlign'。 ...編譯失敗:9個錯誤,0個警告 btouch:API綁定包含錯誤。 – 2011-04-08 14:31:40

+0

我想我已經在發生這個錯誤: https://bugzilla.novell.com/show_bug.cgi?id=662903 $ /開發商/ MonoTouch中的/ usr/bin中/ btouch sparrow.cs -s:枚舉.cs extensions.cs sparrow.cs(140,11):錯誤CS0260:「Sparrow.SPButton」類型的聲明缺少部分修飾符。此類型的另一個部分聲明存在 extensions.cs(8,30):(與前一錯誤相關的符號的位置) ... sparrow.cs(464,11):錯誤CS0260:聲明時缺少部分修飾符鍵入'Sparrow.SPEventDispatcher'。 編譯失敗:10個錯誤,0個警告 btouch:API綁定包含錯誤。 – 2011-04-08 16:04:42

0

嘗試創建退房手續腳本再生第三部分圖書館 另一種方式來避免這個問題,是的INM您的構建輸出您的項目選擇:不要鏈接程序集 和您的項目將工作

0

問題解決!

對於MonoTouch 4.0,我們必須使用smcs而不是gmcs。

下面是用於產生與sparrow.dll MonoTouch的4.0,在兩個步驟中正確的程序:

/開發商/ MonoTouch的在/ usr /斌/ btouch sparrow.cs -s:enum.cs --outdir =根-ns = Sparrow --unsafe --sourceonly = genfiles

/Developer/MonoTouch/usr/bin/smcs -out:sparrow.dll cat genfiles extensions.cs -unsafe -r:/ Developer/MonoTouch/usr/lib/mono/2.1/monotouch.dll enum.cs -target:庫

感謝Geoff Norton和Duane Wandless的幫助!