简体   繁体   English

无法在Bluestacks上连接/部署Visual Studio Xamarin

[英]Cannot connect/deploy Visual Studio Xamarin on Bluestacks

I'm using MSVS2015Pro with Xamarin . 我正在将MSVS2015ProXamarin MSVS2015Pro使用。

I also installed BlueStacks to get an AVD . 我还安装了BlueStacks以获取AVD

But for some reason the the BlueStacks AVD doesn't appear on the available devices list to debug with. 但是由于某种原因, BlueStacks AVD没有出现在可用设备列表中进行debug

Check the following image: 检查以下图像:

在此处输入图片说明

[EDIT] [编辑]

FYI: On the Visual Studio Output window I get the error (I didn't see before): 仅供参考:在Visual Studio输出窗口中,我得到了错误(之前没有看到):

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. 我曾经使用过一个Xamarin Studio插件,但是您可以手动使用adb (Android调试桥)来启用/禁用连接。

Get the ip and port number of the running Bluestack instance via, it is usually 127.0.0.1:5555 通过获取运行中的Bluestack实例的IP和端口号,通常为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.BlueStacks.Addin

How to connect Bluestacks (4) Android Emulator with Visual Studio (this case 2019): 如何将Bluestacks(4)Android模拟器与Visual Studio连接 (这种情况为2019):

Step 1: 第1步:

Activate ADB-Settings in Bluestacks 在Bluestacks中激活ADB设置

在此处输入图片说明

Step 2: 第2步:

In VS go to Tools -> Android -> Android Adb Command Prompt... and insert 在VS中,转到工具-> Android-> Android Adb命令提示符...,然后插入

adb connect 127.0.0.1:5555 亚行连接127.0.0.1:5555

Done! 做完了!

You should now see the device, which is selected in the Bluestacks Advanced-Settings as Device-Profil 现在您应该看到该设备,该设备已在Bluestacks Advanced-Settings中选择为Device-Profil 在此处输入图片说明 在此处输入图片说明

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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