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.
I managed to get past this error by doing the follow:
- 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.
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's easy enough to do in order to carry on.
As a side note, if the applications runs and immediately quits, then do the following:
- Stop the emulator
- Open the Hyper-V Manager application
- Right-click the emulator and select "Settings"
- Expand the "Processor" node and select "Compatibility"
- Tick "Migrate to physical computer with different processor version"
UPDATE #1
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".
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
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:
- Open Registry Editor by selecting Run from the Start buttons context menu, typing regedit in the dialog box, and choosing OK.
- Navigate to HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Android SDK Tools in the folder tree on the left.
- Modify the Path registry variable to match the path to your Android SDK.
- Restart the emulator and you should now be able to see the emulator connected to ADB and associated Android tools.
I ran into this. Rebooted the machine and the device. All good now.
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.
Uninstall the app on the emulator and restart the emulator.
That seemed to be the thing that did it for me. I was on a Android 6 emulator, with HAXM. I also tried disabling Use Shared Runtime
and Use Fast Deployment (debug mode only)
in xamarin.android > properties > android options
which may have helped in the past but I don't think helped this time. ...it could have also been rebooting my computer seven times and turning hyper-v on and then off through windows features
but who knows.
来源:https://stackoverflow.com/questions/50345987/xamarin-waiting-for-runtime-checks-to-complete-and-vs-emulator