[英]Building xamarin.forms Android solution results in BadImageFormatException of Monoandroid10
Been developing an application which, as for now, runs only on iOS and everything runs great here. 正在开发一个应用程序,目前只在iOS上运行,一切都运行得很好。 Now I want to run the Android Project, but I keep getting this error: 现在我想运行Android项目,但我一直收到这个错误:
/Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Android/Xamarin.Android.Common.targets(2,2): Error: Exception while loading assemblies: Java.Interop.Tools.Diagnostics.XamarinAndroidException: error XA0009: Error while loading assembly: /Users/ulriksandberg/.nuget/packages/system.runtime.loader/4.3.0/lib/MonoAndroid10/ . /Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Android/Xamarin.Android.Common.targets(2,2):错误:加载程序集时出现异常:Java.Interop.Tools.Diagnostics.XamarinAndroidException:错误XA0009:加载程序集时出错:/Users/ulriksandberg/.nuget/packages/system.runtime.loader/4.3.0/lib/MonoAndroid10/ 。 ---> System.BadImageFormatException: Format of the executable (.exe) or library (.dll) is invalid. ---> System.BadImageFormatException:可执行文件(.exe)或库(.dll)的格式无效。
I'm running on the local emulator Android_Accelerated_Oreo, or atleast I want to. 我正在本地模拟器Android_Accelerated_Oreo上运行,或至少我想要。
XA0009 Error while loading assemblies: {0}. XA0009加载程序集时出错:{0}。
Much of the reason for this error is due to the fact that the program is loading NuGet packages or other bound library files.You can try the following method: 此错误的大部分原因是由于程序正在加载NuGet包或其他绑定的库文件。您可以尝试以下方法:
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.