简体   繁体   中英

Cannot connect/deploy Visual Studio Xamarin on Bluestacks

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:

在此处输入图片说明

[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'

在此处输入图片说明

Any idea on how to solve this?

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

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

Step 1:

Activate ADB-Settings in Bluestacks

在此处输入图片说明

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 在此处输入图片说明 在此处输入图片说明

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM