Bluestack-Android虚拟设备不';无法获得分配的IP和端口

Bluestack-Android虚拟设备不';无法获得分配的IP和端口,android,visual-studio,xamarin,xamarin.android,bluestacks,Android,Visual Studio,Xamarin,Xamarin.android,Bluestacks,我刚刚使用默认配置安装了BlueStacks最新版本。 然后我运行了Android SDK命令: > adb devices 我得到: List of devices attached emulator-5554 device 如您所见,bluestack没有IP和端口 我不能从MSVS2015部署到这个AVD,我想这就是原因,因为我还安装了Genymotion AVD,它有一个IP和端口,这在MSVS2015中是可见的 List of devices attached 192.1

我刚刚使用默认配置安装了
BlueStacks
最新版本。 然后我运行了
Android SDK
命令:

> adb devices
我得到:

List of devices attached
emulator-5554   device
如您所见,
bluestack
没有
IP
端口

我不能从
MSVS2015
部署到这个
AVD
,我想这就是原因,因为我还安装了
Genymotion AVD
,它有一个
IP
端口
,这在
MSVS2015
中是可见的

List of devices attached
192.168.189.101:5555    device

如何使
bluestack
AVD
获取
IP
端口
,然后从
MSVS2015/Xamarin
部署到它?

尝试以下操作:在命令提示符下运行
netstat-a
。如果看到
127.0.0.1:5555正在运行
,则一切正常,否则禁用防火墙。然后运行
adb connect 127.0.0.1:5555
。希望它能有所帮助。

对我来说,以下方法奏效了:在Bluestacks机器上(假设它是Windows机器),以管理员身份运行cmd并键入:

netsh interface portproxy add v4tov4 listenaddress={ip.of.bluestacks.windows.machine} listenport=5555 connectaddress=127.0.0.1 connectport=5555
现在,您可以使用从远程计算机进行连接

adb connect {ip.of.bluestacks.windows.machine}:5555

运行上述命令时,我得到:
无法连接到emulator-5554:5555:无法解析主机“emulator-5554”和端口5555:未知此类主机。(11001)
需要更多咖啡
adb shell ifconfig
获取模拟器的ip地址,然后
adb tcpip 6000
将端口6000映射到tcp,然后
adb connect{ip}:6000
其中{ip}是从
ifconfig
获得的ip地址,部署错误是什么?您通常不需要通过tcp运行adb来进行任何部署,如果您不想使用USB线连接设备,则通常需要通过wifi运行adb。只要您是从同一台主机部署,只要在“adb设备”中看到设备名称就足够了。我没有收到任何部署错误,因为
MSVS2015
没有在可用设备下列出
BlueStacks AVD
。因此,我无法在该
AVD
上部署,并且在部署时不会出现任何错误。@sushingover,当我在windows控制台上运行命令:
>adb shell ifconfig
时,我没有得到任何输出,也没有任何更改。仍然不起作用。