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

11,617

Solution 1

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.

Solution 2

You need restart ADB service. Visual Studio-Service-Android-restart adb service. It helped for me.

In Visual Studio from the Menu Bar: Tools -> Android -> Restart Adb Server

Solution 3

I was having the same issue. Spent hours trying to fix it. Tried all the answers above to no avail. Opened Android Device Manager and did a Factory Reset on all of my emulators. It fixed the problem.

Solution 4

In this link there are some issue fixings for VS android emulator. One of them is about this problem that adb cannot connect to the emulator. This is caused by the difference between the path of adb that emulator points, and the real path of adb that visual studio works with. This conflicts might be caused by updating visual studio or its components. The simple and permanent solution is to change the path that emulator points to. Just do the followings:

  1. Open Registry Editor by selecting Run from the Start buttons context menu, typing regedit in the dialog box, and choosing OK.
  2. Navigate to HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Android SDK Tools in the folder tree on the left.
  3. Modify the Path registry variable to match the path to your Android SDK.
  4. Restart the emulator and you should now be able to see the emulator connected to ADB and associated Android tools.

Solution 5

I ran into this. Rebooted the machine and the device. All good now.

Share:
11,617

Related videos on Youtube

JCB2018
Author by

JCB2018

Updated on June 21, 2022

Comments

  • JCB2018
    JCB2018 almost 2 years

    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.

  • MC9000
    MC9000 over 3 years
    Same issue. So far 2 solid days of this nightmare. Not one solution here works. All this on a newly built machine.
  • MC9000
    MC9000 over 3 years
    Tried this too. No joy.
  • MC9000
    MC9000 over 3 years
    No working solutions. It's 2020 and, as per Google, there are still about 20,000 devs querying this problem as of December. Is this a Microsoft bug or an Android SDK bug?
  • MC9000
    MC9000 over 3 years
    for most of us, the emulator screen is black - so no ">>" to click on
  • Tim
    Tim over 3 years
    yeah, whats the ">>" we're supposed to click on? restarting the adb server worked for me
  • joe blogs
    joe blogs over 3 years
    I just started having this issue to with physical devices, github.com/xamarin/xamarin-android/issues/5532
  • StevoKeano
    StevoKeano over 3 years
    This is the solution. Thanks.