6

I'm using MSVS2015Pro with Xamarin.

I also installed BlueStacks to get an AVD.

But for some reason the the BlueStacks AVD doesn't appear on the available devices list to debug with.

Check the following image:

enter image description here

[EDIT]

FYI: On the Visual Studio Output window I get the error (I didn't see before):

Emulator name lookup failed for emulator 'emulator-5554'

enter image description here

Any idea on how to solve this?

nightclub
  • 671
  • 2
  • 9
  • 20
  • I added another screenshot to my question (under `[EDIT]`) where you can see an error I'm getting (I didn't see it before): `Emulator name lookup failed for emulator 'emulator-5554'`. I still cannot connect to the `BlueStacks AVD`. Maybe that error can help somehow to solve this. – nightclub Nov 21 '16 at 02:19

2 Answers2

14

How to connect Bluestacks (4) Android Emulator with Visual Studio (this case 2019):

Step 1:

Activate ADB-Settings in Bluestacks

enter image description here

Step 2:

In VS go to Tools -> Android -> Android Adb Command Prompt... and insert

adb connect 127.0.0.1:5555

Done!

You should now see the device, which is selected in the Bluestacks Advanced-Settings as Device-Profil enter image description here enter image description here

Aiko West
  • 791
  • 1
  • 10
  • 30
3

I had a Xamarin Studio Addin that I used to use for this, but you can manually use adb (Android Debug Bridge) to enable/disable the connection.

Get the ip and port number of the running Bluestack instance via, it is usually 127.0.0.1:5555

adb devices

Once you have that, you can connect and disconnect from it.

Connect:

adb connect {ip:port} 

Disconnect:

adb disconnect {ip:port}

Ref: SushiHangover.BlueStacks.Addin

SushiHangover
  • 73,120
  • 10
  • 106
  • 165
  • Could you say me how to do this with Visual Studio 2015 Pro?. I used Genymotion and I didn't have to do anything, it was ready and go, but I wanna use BlueStacks. – nightclub Nov 16 '16 at 17:22
  • I added another screenshot to my question (under `[EDIT]`) where you can see an error I'm getting (I didn't see it before): `Emulator name lookup failed for emulator 'emulator-5554'`. I still cannot connect to the `BlueStacks AVD`. Maybe that error can help somehow to solve this. – nightclub Nov 21 '16 at 02:20
  • see my answer, if this is still relevant for you :) – Aiko West Nov 05 '19 at 08:57