Xamarin Forms Android:获取 XA3001:无法 AOT 程序集

Posted

技术标签:

【中文标题】Xamarin Forms Android:获取 XA3001:无法 AOT 程序集【英文标题】:Xamarin Forms Android: Getting XA3001: Could not AOT the assembly 【发布时间】:2019-03-03 21:45:08 【问题描述】:

无论链接器选项如何,几乎所有程序集(如下所列)都会出错。我不知道 AOT 编译器的问题出在哪里。你有什么想法吗?

编辑:我是 xamarin 和应用程序开发的新手。 诊断级别为here 的完整错误消息。重现问题的示例项目here。

受影响的程序集:

Projet "Chronique.android.csproj" (Install cibles) :
XA3001: Could not AOT the assembly: FFImageLoading.dll
XA3001: Could not AOT the assembly: Chronique.dll
XA3001: Could not AOT the assembly: FFImageLoading.Forms.dll
XA3001: Could not AOT the assembly: FFImageLoading.Transformations.dll
XA3001: Could not AOT the assembly: Chronique.Android.dll
XA3001: Could not AOT the assembly: FFImageLoading.Platform.dll
XA3001: Could not AOT the assembly: FFImageLoading.Forms.Platform.dll
XA3001: Could not AOT the assembly: FormsViewGroup.dll
XA3001: Could not AOT the assembly: IF.Lastfm.Core.dll
XA3001: Could not AOT the assembly: Hqub.MusicBrainz.API.dll

**Configuration:**

Microsoft Visual Studio Enterprise 2017 
Version 15.8.5
VisualStudio.15.Release/15.8.5+28010.2036
Microsoft .NET Framework
Version 4.7.03056

Version installée : Enterprise

Mono Debugging for Visual Studio   4.11.11-pre (8fb558f)
Support for debugging Mono processes with Visual Studio.

Xamarin   4.11.0.776 (d15-8@1ae9b59d7)
Extension Visual Studio permettant de développer pour Xamarin.ios et Xamarin.Android.

Xamarin Designer   4.15.9 (d000f568b)
Visual Studio extension to enable Xamarin Designer tools in Visual Studio.

Xamarin Templates   1.1.116 (9619170)
Templates for building iOS, Android, and Windows apps with Xamarin and Xamarin.Forms.

Xamarin.Android SDK   9.0.0.19 (HEAD/a8a3b0ec7)
Xamarin.Android Reference Assemblies and MSBuild support.

Xamarin.iOS and Xamarin.Mac SDK   12.0.0.15 (84552a4)
Xamarin.iOS and Xamarin.Mac Reference Assemblies and MSBuild support.

【问题讨论】:

为 MSBuild 打开诊断级别调试,清理/重建并发布完整的 AOT 构建错误。 好的,我会这样做的 好吧,aot 似乎适用于我的 appcenter 构建,也许这是我本地视觉工作室的一个错误.. 解决方法在这里:***.com/a/53979275/7149454 【参考方案1】:

我在我的慢速家用 PC 上为我的爱好项目使用 AOT 进行编译,得到了类似的错误。我尝试了所有可用的解决方法,但没有成功。然后我尝试用我最新的工作计算机编译,它成功了。

因此,如果您没有解决方法,请不要忘记在更快的计算机上尝试。

【讨论】:

以上是关于Xamarin Forms Android:获取 XA3001:无法 AOT 程序集的主要内容,如果未能解决你的问题,请参考以下文章

如何在 Xamarin.Forms 中获取/检测屏幕大小?

如何在 xamarin.forms 中获取状态栏高度?

Xamarin Forms Android 10 及更高版本在公共外部存储中按文件名查找视频并获取路径

在 Xamarin.Forms 中获取图像或 ImageSource 的字节 [] / 流?

关于xamarin.forms Android创建文件与写文件 (ftp)

如何使用 Xamarin 在 Android 中同步获取 GPS 位置更新?