无法在 Android 模拟器上部署 Xamarin Forms

Cannot Deploy on Android Emulator Xamarin Forms

我有这个跨平台应用程序,可以在 iOS 和 Android 物理设备上很好地部署,但是当我尝试在 Android 模拟器上 运行 它时,我收到此错误:

未能从 /data/user/0/it.HangoverApp.Hangover/files/.override/links/libmonosgen-2.[= 开始 运行time 26=]:dlopen 失败:“/data/app/Mono.Android.DebugRuntime-33RyZeuaossylXX2LQhf0w==/lib/x86/libmonosgen-32bit-2.0.so”有意外的 e_machine:3(EM_386 )

我目前在 Visual Studio Mac 8.8.7,我在 Windows 的同事没有遇到任何问题, 模拟设备配置: Pixel 2 Pie 9.0 - API 28,x86 处理器。

有什么想法吗?

根据你的描述和错误信息,我建议你可以查看Supported Architectures contains x86,关于指定Supported Architectures,你可以看看这个帖子:

https://docs.microsoft.com/en-us/xamarin/android/app-fundamentals/cpu-architectures?tabs=macos#how-to-specify-supported-architectures