2013-03-08 34 views
1

我正在使用MonoTouch 6.2,並且我有一個應用程序在模擬器上生成並運行良好,但在爲實際設備構建時出現「無法建立裝配」錯誤。MonoTouch'不能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 

回答

1

固定..問題是我有一個MonoPInvokeCallbackAttribute與沒有該功能的簽名匹配委託類型。例如:

delegate int SomeDelegate(); 

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

所以SomeDelegate的簽名不匹配的myCallBack函數簽名。

+1

什麼可能使這個答案有用,如果你分享你是如何知道這是問題。 – 2015-11-08 03:46:19

相關問題