Xamarin Forms-iOS-错误MT3001:无法AOT程序集

时间:2019-10-11 21:47:11

标签: ios xamarin xamarin.forms xamarin.ios aot

Xamarin Forms iOS项目于19/10/10进行建设。今天已更新为Mac和Windows上的最新组件,项目不再生成。

内部版本:发布-iPhone-TestMobile.iOS-设备

项目可在Mac模拟器上运行。 Project在iPhone硬件上部署和调试。

  • Visual Studio Pro 2019-16.3.4
  • Visual Studio 2019 for Mac-8.3.3 版本8
  • 所有Mac上最新的组件
  • MacOS Catalina 10.15

构建日志:

3>  AOT Compilation exited with code 1, command:
3>  MONO_PATH=/Users/bob/Library/Caches/Xamarin/mtbs/builds/TestMobileXF.iOS/e5f1c3a4936492ad245f1c68c3157dfc/C:/Temp/iOS/mtouch-cache/32/3-Build /Library/Frameworks/Xamarin.iOS.framework/Versions/13.4.0.2/bin/arm-darwin-mono-sgen --debug -O=gsharedvt -O=-float32  --aot=mtriple=armv7-ios,data-outfile=/Users/bob/Library/Caches/Xamarin/mtbs/builds/TestMobileXF.iOS/e5f1c3a4936492ad245f1c68c3157dfc/C:/Temp/iOS/mtouch-cache/armv7/ZXingNetMobile.aotdata.armv7,static,asmonly,direct-icalls,full,soft-debug,dwarfdebug,no-direct-calls,outfile=/Users/bob/Library/Caches/Xamarin/mtbs/builds/TestMobileXF.iOS/e5f1c3a4936492ad245f1c68c3157dfc/C:/Temp/iOS/mtouch-cache/armv7/ZXingNetMobile.dll.s "/Users/bob/Library/Caches/Xamarin/mtbs/builds/TestMobileXF.iOS/e5f1c3a4936492ad245f1c68c3157dfc/C:/Temp/iOS/mtouch-cache/32/3-Build/ZXingNetMobile.dll"
3>  '/Users/bob/Library/Caches/Xamarin/mtbs/builds/TestMobileXF.iOS/e5f1c3a4936492ad245f1c68c3157dfc/C' in MONO_PATH doesn't exist or has wrong permissions.
3>  '/Temp/iOS/mtouch-cache/32/3-Build' in MONO_PATH doesn't exist or has wrong permissions.
3>  The assembly mscorlib.dll was not found or could not be loaded.
3>  It should have been installed in the `/Users/builder/jenkins/workspace/xamarin-macios/xamarin-macios/external/mono/sdks/out/ios-cross32-release/lib/mono/4.5/mscorlib.dll' directory.
3>  /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang  -Wno-receiver-forward-class -Wno-objc-missing-super-calls -Wno-unguarded-availability-new -stdlib=libc++ -gdwarf-2 -std=c++14 -I/Library/Frameworks/Xamarin.iOS.framework/Versions/13.4.0.2/SDKs/MonoTouch.iphoneos.sdk/usr/include -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS13.1.sdk -Qunused-arguments -miphoneos-version-min=8.0 -arch arm64 -c -o /Users/bob/Library/Caches/Xamarin/mtbs/builds/TestMobileXF.iOS/e5f1c3a4936492ad245f1c68c3157dfc/C:/Temp/iOS/mtouch-cache/arm64/registrar.o -x objective-c++ -DDEBUG /Users/bob/Library/Caches/Xamarin/mtbs/builds/TestMobileXF.iOS/e5f1c3a4936492ad245f1c68c3157dfc/C:/Temp/iOS/mtouch-cache/64/registrar.m

3>  C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\MSBuild\Xamarin\iOS\Xamarin.iOS.Common.targets(842,3): 
error MT3001: Could not AOT the assembly '/Users/bob/Library/Caches/Xamarin/mtbs/builds/TestMobileXF.iOS/e5f1c3a4936492ad245f1c68c3157dfc/C:/Temp/iOS/mtouch-cache/64/3-Build/TestMobileXF.iOS.exe'

尝试过iOS Build设置:

  • 链接器行为
  • 支持的体系结构
  • LLVM编译器
  • 增量构建

还原Visual Studio Pro 2019是不得已的方法。任何想法表示赞赏。

2 个答案:

答案 0 :(得分:0)

将体系结构更改为仅ARM64,它将成功构建。

参见此处:https://github.com/xamarin/xamarin-macios/issues/6925

失败的原因是Xamarin.iOS 12.99(和13.0)附带的32位AOT编译器本身就是32位二进制文​​件,而32位二进制文​​件将无法在macOS 10.15 Catalina上执行。

希望这会有所帮助

答案 1 :(得分:0)

发现了问题。在iPhone的iOS.csproj文件中对此设置-发布配置文件:

OnAppearing

link link

在详细的构建日志中看到“ MONO_PATH不存在或权限错误”。

该项目现在已构建,我可以创建一个存档,并在Mac上查看IPA文件。