Search code examples
visual-studioxamarinxamarin.formsvisual-studio-2017visual-studio-emulator

Xamarin "Waiting for runtime checks to complete" and VS Emulator


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):

Waiting for runtime checks to complete

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 Forms: 3.0.0.482510

Any direction/suggestions would be appreciated.

EDIT 1: Using the Android SDK image works, so the issue seems to be with the Hyper-V VM.


Solution

  • I managed to fix this error by doing following the below steps:

    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.

    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. Stop the emulator.
    2. Open the Hyper-V Manager application.
    3. Right-click the emulator and select "Settings".
    4. Expand the "Processor" node and select "Compatibility".
    5. Tick "Migrate to physical computer with different processor version".

    After looking at the link provided by @masound I found that the registry key was missing. So, I did the following:

    • 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.