升级到 Monotouch 4.0 后 MissingMethodException
有人使用优秀的 Sparrow 2D monotouch 库吗?
https://github.com/trustme/Sparrow
我刚刚更新到 Monotouch 4.0 和 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版本,但问题仍然存在。
有什么线索吗?
Does anyone use the excellent Sparrow 2D monotouch library?
https://github.com/trustme/Sparrow
I just updated to Monotouch 4.0 and Monodevelop 2.4.2, and when
rebuilt and run SparrowTest gives me this strange error:
System.MissingMethodException has been thrown "Method not found:
'Monotouch.ObjCRuntime.Messaging.void_objc_msgSend_Boolean'." at
SparrowTest.AppDelegateIPhone.FinishedLaunching in
AppDelegateIPhone.cs:23
The method is:
SPStage.SupportHighResolutions = true;
When commented it gives the same error on many other methods. I've
tried using different sdk versions but the problem persists.
Any clues?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
您需要使用 btouch 为 MonoTouch 4 重新生成 sparrow.dll。
You need to regenerate the sparrow.dll with btouch for MonoTouch 4.
尝试创建带有 -out 的脚本来重新生成第三方库
避免此问题的另一种方法是在项目的构建输出中选择:不要链接程序集
你的项目将会成功
try to create a script with -out to regenerate Third Part Libraries
another way to avoid this problem, is that inm your build output of your project choose : Don't link the assemblies
and your project will work
问题解决了!
对于 MonoTouch 4.0,我们必须使用 smcs 而不是 gmcs。
以下是使用 MonoTouch 4.0 生成 sparrow.dll 的正确过程,分两步:
/Developer/MonoTouch/usr/bin/btouch sparrow.cs -s:enum.cs --outdir=gen -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:library感谢 Geoff Norton 和 Duane Wandless 的帮助!
Problem solved!
With MonoTouch 4.0 we must use smcs instead of gmcs.
Here is the right procedure for generating sparrow.dll with MonoTouch 4.0, in two steps:
/Developer/MonoTouch/usr/bin/btouch sparrow.cs -s:enum.cs --outdir=gen -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:libraryThanks to Geoff Norton and Duane Wandless for the help!