无法使用 ADB 在 Hyper-V 虚拟机上调试 android 应用程序:错误无法连接到 127.0.0.1

Can't debugging android app on Hyper-V Virtual Machine using ADB: Error Cannot connect to 127.0.0.1

我正尝试在使用 Hyper-V 创建的虚拟机上调试(使用 Visual Studio)我的 android 应用程序(使用 ADB)。

通过本指南 (https://bitbucket.org/chabernac/adbportforward/wiki/Home) 我能够 visual studio(安装在虚拟机中)我的设备 (Samsung S8) 作为调试设备。

问题是,当我开始从虚拟机调试到我的设备(连接在同一个 wifi 网络中)时,出现此错误:

Cannot start debugging: Cannot connect to 127.0.0.1:29308: 
No connection could be made because the target machine 
actively refused it 127.0.0.1:29309 
Couldn't connect debugger. 
You can see more details in Xamarin Diagnostic output and the full exception on logs.

在 Xamarin 诊断输出中看不到任何可以让我理解问题所在的内容。

你能帮帮我吗?谢谢

我认为您必须下载最新的 SDK 平台工具 Android。