Xamarin“等待运行时检查完成".和VS仿真器 [英] Xamarin "Waiting for runtime checks to complete" and VS Emulator
问题描述
我创建了一个新的简单的Xamarin Cross Platform应用程序,使用棉花糖(6.0 API 23)在VS模拟器中运行Android项目时遇到以下错误:
I have created a new, bare bones, Xamarin Cross Platform application and I get the following error when running the Android project in a VS emulator using Marshmallow (6.0 API 23):
等待运行时检查完成
模拟器成功启动,并且项目构建时没有警告或错误.我已将其保留在这种状态下过夜,但无法超过这一点.
The emulator boots up successfully and the project builds without warnings or errors. I've left it in this state overnight, but it fails to get past this point.
- VS:15.7.1
- Xamarin形式:3.0.0.482510
任何方向/建议将不胜感激.
Any direction/suggestions would be appreciated.
编辑1 : 使用Android SDK映像可以正常工作,因此问题似乎出在Hyper-V VM上.
EDIT 1: Using the Android SDK image works, so the issue seems to be with the Hyper-V VM.
推荐答案
我通过执行以下步骤设法解决了该错误:
I managed to fix this error by doing following the below steps:
- 构建并运行应用程序.
- 该构建将在等待运行时检查"时停滞.
- 在仿真器中,单击右侧工具栏中的
>>
箭头. - 记下 Windows Phone Emulator内部交换机的IP地址.
- 返回VS.从菜单中选择工具→ Android→ Android ADB命令提示符
- 键入
adb connect [IP_FROM_STEP_#4]
. - 构建应继续.
- Build and Run the application .
- The build will stall with at "Waiting for Runtime Checks".
- In the emulator click the
>>
arrows in the tool-bar to the right. - Make a note of the IP address for the Windows Phone Emulator Internal Switch.
- Back in VS. From the menu select Tools → Android → Android ADB Command Prompt
- Type
adb connect [IP_FROM_STEP_#4]
. - The build should continue.
您应该仅在每次启动模拟器时执行此操作.它没有解决VS无法自动连接的问题,但是我发现这样做很容易,以便继续进行.
You should only need to do this each time the emulator is started. It didn't solve the issue of VS not connecting automatically, but I find it easy enough to do in order to carry on.
请注意,如果应用程序运行并立即退出,请执行以下操作:
As a side note, if the applications runs and immediately quits, then do the following:
- 停止模拟器.
- 打开Hyper-V Manager应用程序.
- 右键单击仿真器,然后选择设置".
- 展开处理器"节点,然后选择兼容性".
- 勾选迁移到具有不同处理器版本的物理计算机".
查看@masound提供的链接后,我发现注册表项丢失.因此,我做了以下事情:
After looking at the link provided by @masound I found that the registry key was missing. So, I did the following:
- 在
HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node
中添加了"Android SDK工具"键. - 添加了一个名为
Path
和值C:\Program Files (x86)\Android\android-sdk
的字符串值.
- Added the "Android SDK Tools" key to
HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node
. - Added a string value with the name
Path
and valueC:\Program Files (x86)\Android\android-sdk
.
这篇关于Xamarin“等待运行时检查完成".和VS仿真器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!