MonoTouch的“无法AOT大会”(MonoTouch 'could not AOT t

2019-10-17 18:59发布

我使用MonoTouch的6.2和我有建立并在模拟器上运行良好,但是当我建立实际的设备得到一个“无法AOT大会”错误的应用程序。

谁看过这个吗?

以下是编译器输出:

/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

Answer 1:

固定..问题是我有一个MonoPInvokeCallbackAttribute与没有该功能的签名匹配委托类型。 例如:

delegate int SomeDelegate();

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

所以SomeDelegate的签名不匹配myCallBack函数的签名。



文章来源: MonoTouch 'could not AOT the assembly'
标签: xamarin.ios