Android emulator not showing in Visual Studio

22,476

Solution 1

I had a similar issue using VS 2015 with Android Emulator Manager (AVD). I have to start my emulator from the Android Emulator Manager and then it will show up in the debug devices drop down list, but one day it didn't show up. Tools > Android > Restart Adb Server fixed it for me.

Solution 2

For me on VS 2017 it was a matter of my user not being an admin. The issue is that unless the ANDROID_SDK_HOME environment variable is set it will create a .android folder in the %userprofile% directory and visual studio uses that to look for emulated devices. But when AVD is run as an administrator it uses whatever admin profile you use for admin priveledges and uses the .android folder under that user for managing emulated devices.

Following the link shows a guide on how to set the environmental variable so that all users look in the same location for emulated devices.

https://www.mysysadmintips.com/windows/clients/761-move-android-studio-avd-folder-to-a-new-location

Solution 3

After making sure that you have installed the required software properly (having the Hyper-V option checked in Windows Features, also enabled in BIOS) :

  1. Go to your project's properties by selecting the project in Solutions Explorer and clicking ALT+ENTER
  2. After that, make sure that the Minimum Android to target is greater than or equal to at least one of your Device Profiles in Visual Studio Emulator Manager.

Solution 4

Similar issue here, I had a series of android emulators setup in Visual Studio 2015 Android Emulator Manager (AVD), but when I tried to run a xamarin.forms sample, none of the emulators I created were showing up in the debug targets drop-down.

What fixed it for me was to set the android project as StartUp Project manually (right-click project > set as startup project)

For some reason (bug/feature?) it doesn't suffice to just change the selected item from Visual Studio menu drop-down 'startup projects'. Hope this helps!

Share:
22,476
make_transition
Author by

make_transition

Senior developer http://bytesizebacon.blogspot.co.uk/ http://www.bakwon.com/ https://soundcloud.com/kwanjo https://www.youtube.com/user/TheHardSteppa

Updated on July 05, 2022

Comments

  • make_transition
    make_transition almost 2 years

    I made an Android Virtual Device. It runs on the SDK emulator using Intel HAXM. I was able to see it in Visual studio (debug devices drop down list) and debug my applications on it. This is great for when I don't have a physical device to hand. Then something happened!?! It refuses to show up now?

    Over the last week I have tried (In no particular order):

    • Recreating my virtual device.
    • Reinstalling visual studio.
    • Reinstalling Android SDK.
    • Installing both of the above as an administrator.
    • Checking the SDK path in the windows registry.
    • Tried adb kill-server / start-server.
    • Checked that Adb can see the device - it can.
    • Tried uninstalling/reinstalling HAXM manually.
    • Made sure my project targets API of the emulator.
    • Made sure that the build active configuration matches the emulator.
    • Ended any other ADB processes using task manager (leaving just the one for visual studio).
    • Checked windows event log for any warnings/errors. Nothing.

    I have read these. Also no joy...

    Other info:

    • I am using Visual Studio 2015 Community.
    • Physical devices work and appear without fail in the devices drop down!
    • latest android SDK