Visual Studio Android Emulator won't run application

夙愿已清 提交于 2019-12-05 01:53:36

Like the other commenters, this is most likely just a symptom of slow emulator on your machine. I'm running Xamarin-Android development on my 2010-era OSX machine in mavericks with 8GB RAM, and it is slow-slow-slow, but usable. Try to find the Intel x86 speeds improvements (look for HAXM) and you will find that the emulator will be much much faster.

And yeah, get a real handset and plug it in to your computer: always much faster than emulation.

later edit Get Genymotion for Mac OSX or for PC/Windows or PC/Linux. It's way way way faster than the other emulators. I have since found that this is as fast, or faster, than running the App on my connected Android phone. It's certainly simpler in not having to have the device plugged into one of my USB ports, and allows me to code and test on the train. http://www.genymotion.com/

Don't know if my issue was the same but finally this troubleshooting helped me to run emulator https://msdn.microsoft.com/en-us/library/mt228282.aspx#ADB. I was missing key Android SDK Tools with string value Path in registry Computer\HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node

I've created it manually and it worked.

UPDATE

Before I got the issue with running emulator, I couldn't see it in Visual Studio. The reason was I've installed VS Android Emulator through standalone installation, not through VS Installer. It had to be installed there as well.

I had the similar issue, and then I deleted the existing device simulator and reinstalled again and it started working.

As I use a different SDK, in my case

Go to Tools > Options > Xamarin and set the Android SDK path.

Sometime Visual Studio changes this configuration;

Worked for ME

Sometimes you close the android Emulator but not POWEROFF the Emulator. this problem happens when emulator shutdown un-properly.

Restart Your EMULATOR

  • First start your emulator
  • Then restart your emulator by pressing down the power button and select restart option in your android emulator.

I enabled Hyper-V acceleration based on microsoft documentations: https://docs.microsoft.com/en-us/xamarin/android/get-started/installation/android-emulator/hardware-acceleration?tabs=vswin&pivots=windows#accelerating-with-hyper-v

Basically you need to turn on these two windows features from the control panel (Turn windows features on of off):

  • Hyper-V.
  • Windows hypervisor platform.

then from visual studio go to: Tools >> Android >> Android SDK manager >> Tools >> make sure that "Android emulator" version is 27.0.1 or higher, if not, you will find in the same screen a button below to update it.

I did this on windows 10 64-bit, with VS 2017 Community 15.9.5

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!