MonoTouch '无法 AOT 组件' [英] MonoTouch 'could not AOT the assembly'

查看:23
本文介绍了MonoTouch '无法 AOT 组件'的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用的是 MonoTouch 6.2,我有一个应用程序可以在模拟器上构建和运行良好,但在为实际设备构建时出现无法 AOT 程序集"错误.

I'm using MonoTouch 6.2 and I have an app that builds and runs fine on the simulator, but gets a "Could not AOT the assembly" error when I build for the actual device.

有人见过这个吗?

这是编译器输出:

/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/g++  -miphoneos-version-min=4.3 -arch armv7  -std=c99 -I/Developer/MonoTouch/SDKs/MonoTouch.iphoneos.sdk/usr/include -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.0.sdk -x assembler-with-cpp -c /var/folders/rw/m66cxvf16kq37jjxdt0d99580000gn/T/tmpc3662b4.tmp/GoogleAnalytics.dll.armv7.s -o /var/folders/rw/m66cxvf16kq37jjxdt0d99580000gn/T/tmpc3662b4.tmp/GoogleAnalytics.dll.armv7.o
AOT Compilation exited with code 134, command:
MONO_PATH=/Users/me/dev/MyApp/Src/Plat/iOS/bin/iPhone/Debug/MyApp.app /Developer/MonoTouch/usr/bin/arm-darwin-mono --debug --aot=mtriple=armv7-darwin,full,static,asmonly,direct-icalls,soft-debug,no-direct-calls,iphone-abi,outfile=/var/folders/rw/m66cxvf16kq37jjxdt0d99580000gn/T/tmpc3662b4.tmp/MyApp.exe.armv7.s "/Users/me/dev/MyApp/Src/Plat/iOS/bin/iPhone/Debug/MyApp.app/MyApp.exe"
Mono Ahead of Time compiler - compiling assembly /Users/me/dev/MyApp/Src/Plat/iOS/bin/iPhone/Debug/MyApp.app/MyApp.exe
* Assertion at ../../../../../mono/mono/metadata/marshal.c:8613, condition `sig->param_count == invoke_sig->param_count + 1' not met


Mono Ahead of Time compiler - compiling assembly /Users/me/dev/MyApp/Src/Plat/iOS/bin/iPhone/Debug/MyApp.app/mscorlib.dll
Code: 1337720 Info: 35037 Ex Info: 487954 Unwind Info: 8707 Class Info: 22674 PLT: 3057 GOT Info: 65112 GOT: 22092 Offsets: 31427
Output file: '/var/folders/rw/m66cxvf16kq37jjxdt0d99580000gn/T/tmpc3662b4.tmp/mscorlib.dll.armv7.s'.
Linking symbol: '_mono_aot_module_mscorlib_info'.
Compiled 6288 out of 6288 methods (100%)
Methods without GOT slots: 4052 (64%)
Direct calls: 246 (2%)
JIT time: 1134 ms, Generation time: 1793 ms, Assembly+Link time: 203 ms.

/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/g++  -miphoneos-version-min=4.3 -arch armv7  -std=c99 -I/Developer/MonoTouch/SDKs/MonoTouch.iphoneos.sdk/usr/include -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.0.sdk -x assembler-with-cpp -c /var/folders/rw/m66cxvf16kq37jjxdt0d99580000gn/T/tmpc3662b4.tmp/mscorlib.dll.armv7.s -o /var/folders/rw/m66cxvf16kq37jjxdt0d99580000gn/T/tmpc3662b4.tmp/mscorlib.dll.armv7.o
error MT3001: Could not AOT the assembly '/Users/me/dev/MyApp/Src/Plat/iOS/bin/iPhone/Debug/MyApp.app/MyApp.exe'
  at MTouch.GetObjectFileForAssembly (System.String assemblyName, Abi abi) [0x00000] in <filename unknown>:0 
  at MTouch+<CompileAssemblies>c__AnonStorey10.<>m__1A (System.String s) [0x00000] in <filename unknown>:0 
  at System.Threading.Tasks.Parallel+<ForEach>c__AnonStorey36`1[System.String].<>m__34 (System.String e, System.Threading.Tasks.ParallelLoopState s, System.Object l) [0x00000] in <filename unknown>:0 
  at System.Threading.Tasks.Parallel+<ForEach>c__AnonStorey35`2[System.String,System.Object].<>m__32 () [0x00000] in <filename unknown>:0 
  at System.Threading.Tasks.TaskActionInvoker+ActionInvoke.Invoke (System.Threading.Tasks.Task owner, System.Object state, System.Threading.Tasks.Task context) [0x00000] in <filename unknown>:0 
  at System.Threading.Tasks.Task.InnerInvoke () [0x00000] in <filename unknown>:0 
  at System.Threading.Tasks.Task.ThreadStart () [0x00000] in <filename unknown>:0

推荐答案

已修复.. 问题是我有一个 MonoPInvokeCallbackAttribute,其委托类型与函数的签名不匹配.例如:

Fixed.. the problem was I had a MonoPInvokeCallbackAttribute with a delegate type that didn't match the signature of the function. For example:

delegate int SomeDelegate();

[ MonoPInvokeCallbackAttribute ( typeof( SomeDelegate ) ) ]
static void MyCallback( int x )
{
}

因此 SomeDelegate 的签名与 MyCallback 的签名不匹配.

So the signature of SomeDelegate doesn't match the signature of MyCallback.

这篇关于MonoTouch '无法 AOT 组件'的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆