Xamarin“等待运行时检查完成".和VS仿真器 [英] Xamarin "Waiting for runtime checks to complete" and VS Emulator

查看:497
本文介绍了Xamarin“等待运行时检查完成".和VS仿真器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我创建了一个新的简单的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:

  1. 构建并运行应用程序.
  2. 该构建将在等待运行时检查"时停滞.
  3. 在仿真器中,单击右侧工具栏中的>>箭头.
  4. 记下 Windows Phone Emulator内部交换机的IP地址.
  5. 返回VS.从菜单中选择工具→ Android→ Android ADB命令提示符
  6. 键入adb connect [IP_FROM_STEP_#4].
  7. 构建应继续.
  1. Build and Run the application .
  2. The build will stall with at "Waiting for Runtime Checks".
  3. In the emulator click the >> arrows in the tool-bar to the right.
  4. Make a note of the IP address for the Windows Phone Emulator Internal Switch.
  5. Back in VS. From the menu select Tools → Android → Android ADB Command Prompt
  6. Type adb connect [IP_FROM_STEP_#4].
  7. 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:

  1. 停止模拟器.
  2. 打开Hyper-V Manager应用程序.
  3. 右键单击仿真器,然后选择设置".
  4. 展开处理器"节点,然后选择兼容性".
  5. 勾选迁移到具有不同处理器版本的物理计算机".


查看@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 value C:\Program Files (x86)\Android\android-sdk.

这篇关于Xamarin“等待运行时检查完成".和VS仿真器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆