简体   繁体   English

无法为Xamarin.forms运行android模拟器

[英]Can't run android emulator for Xamarin.forms

I've got a Xamarin forms app and am using Xamarin Studio on a Mac. 我有一个Xamarin表单应用程序,并且正在Mac上使用Xamarin Studio。

I can debug my app successfully when running on iOS emulator, however, my app crashes straight away and doesn't give me a chance to find out what's going on when using the android emulator. 当我在iOS模拟器上运行时,我可以成功调试我的应用程序,但是,我的应用程序立即崩溃,并且没有让我有机会了解使用Android模拟器时的情况。

An extract of the application output is below. 下面是应用程序输出的摘要。 There are several errors like these: 有一些这样的错误:

am start -n "com.aangaba.scl/md57e35e077cd3bd07458f75ce95d82a8df.MainActivity" Starting: Intent { cmp=com.aangaba.scl/md57e35e077cd3bd07458f75ce95d82a8df.MainActivity } am start -n“ com.aangaba.scl / md57e35e077cd3bd07458f75ce95d82a8df.MainActivity”开始:意图{cmp = com.aangaba.scl / md57e35e077cd3bd07458f75ce95d82a8df.MainActivity}

[art] Not late-enabling -Xcheck:jni (already on) [art] Unexpected CPU variant for X86 using defaults: x86_64 [monodroid] Using override path: /data/user/0/com.aangaba.scl/files/. [art]不启用-Xcheck:jni(已启用)[art]使用默认值的x86出现意外的X86 CPU变体:x86_64 [monodroid]使用覆盖路径:/data/user/0/com.aangaba.scl/files/。 override [monodroid] Using override path: /storage/emulated/0/Android/data/com.aangaba.scl/files/. 覆盖 [monodroid]使用覆盖路径:/storage/emulated/0/Android/data/com.aangaba.scl/files/。 override [monodroid] Trying to load sgen from: /data/user/0/com.aangaba.scl/files/. 覆盖 [monodroid]尝试从/data/user/0/com.aangaba.scl/files/加载sgen。 override /libmonosgen-2.0.so [monodroid] Trying to load sgen from: /storage/emulated/0/Android/data/com.aangaba.scl/files/. 覆盖 /libmonosgen-2.0.so [monodroid]尝试从以下位置加载sgen:/storage/emulated/0/Android/data/com.aangaba.scl/files/。 override /libmonosgen-2.0.so [monodroid] Trying to load sgen from: /data/app/com.aangaba.scl-1/lib/x86_64/libmonosgen-2.0.so [monodroid] Trying to load sgen from: /data/user/0/com.aangaba.scl/files/. 覆盖 /libmonosgen-2.0.so [monodroid]尝试从以下位置加载sgen:/data/app/com.aangaba.scl-1/lib/x86_64/libmonosgen-2.0.so [monodroid]尝试从以下位置加载sgen:/ data /用户/0/com.aangaba.scl/文件/。 override /links/libmonosgen-2.0.so [monodroid-debug] Trying to initialize the debugger with options: --debugger-agent=transport=dt_socket,loglevel=0,address=10.0.2.2:56150,embedding=1 [Mono] Assembly Loader probing location: '/storage/emulated/0/Android/data/com.aangaba.scl/files/. 覆盖 /links/libmonosgen-2.0.so [monodroid-debug]尝试使用以下选项初始化调试器:--debugger-agent = transport = dt_socket,loglevel = 0,address = 10.0.2.2:56150,embeddding = 1 [Mono] Assembly Loader探测位置:'/ storage / emulated / 0 / Android / data / com.aangaba.scl / files /。 override /mscorlib.dll'. 覆盖 /mscorlib.dll”。 [Mono] Image addref mscorlib[0x7ffee7e37a80] -> /storage/emulated/0/Android/data/com.aangaba.scl/files/. [单声道]图片addref mscorlib [0x7ffee7e37a80]-> /storage/emulated/0/Android/data/com.aangaba.scl/files/。 override /mscorlib.dll[0x7ffee9c64000]: 2 [Mono] AOT module '/storage/emulated/0/Android/data/com.aangaba.scl/files/. 覆盖 /mscorlib.dll[0x7ffee9c64000]:2 [Mono] AOT模块'/storage/emulated/0/Android/data/com.aangaba.scl/files/。 override /mscorlib.dll.so' not found: dlopen failed: library "/data/app/com.aangaba.scl-1/lib/x86_64/libaot-mscorlib.dll.so" not found [Mono] Assembly System.Runtime[0x7ffee7e57380] added to domain RootDomain, ref_count=1 [Mono] AOT module '/storage/emulated/0/Android/data/com.aangaba.scl/files/. 覆盖 /mscorlib.dll.so”未找到:dlopen的失败:库‘/data/app/com.aangaba.scl-1/lib/x86_64/libaot-mscorlib.dll.so’找不到[单声道]大会System.Runtime [0x7ffee7e57380]已添加到域RootDomain,ref_count = 1 [Mono] AOT模块'/storage/emulated/0/Android/data/com.aangaba.scl/files/。 override /System.Runtime.dll.so' not found: dlopen failed: library "/data/app/com.aangaba.scl-1/lib/x86_64/libaot-System.Runtime.dll.so" not found [Mono] AOT module '/Users/builder/data/lanes/3819/96c7ba6c/source/monodroid/builds/install/mono-x86_64/lib/mono/aot-cache/amd64/System.Runtime.dll.so' not found: dlopen failed: library "/data/app/com.aangaba.scl-1/lib/x86_64/libaot-System.Runtime.dll.so" not found 覆盖 /System.Runtime.dll.so”未找到:dlopen的失败:库‘/data/app/com.aangaba.scl-1/lib/x86_64/libaot-System.Runtime.dll.so’找不到[单声道]找不到AOT模块'/Users/builder/data/lanes/3819/96c7ba6c/source/monodroid/builds/install/mono-x86_64/lib/mono/aot-cache/amd64/System.Runtime.dll.so':dlopen失败:找不到库“ /data/app/com.aangaba.scl-1/lib/x86_64/libaot-System.Runtime.dll.so”

It seems that my app files aren't installed on the emulator and I have no idea why. 看来我的应用程序文件未安装在模拟器上,我也不知道为什么。

It reads like you are using the incorrect emulator for the architecture you are targeting. 看起来好像您针对目标架构使用了错误的仿真器。 Launch the AVD Manager and create the correct emulators (an x86_64 atom image sounds like the best bet). 启动AVD Manager并创建正确的仿真器(x86_64原子图像听起来像是最好的选择)。

There are some instructions for creating the virtual device on the following link: 在以下链接上有一些有关创建虚拟设备的说明:

Android SDK Emulator in Xamarin Studio Xamarin Studio中的Android SDK模拟器

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM