Search code examples
androiddebuggingvirtual-machineadbhyper-v

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


I'm trying to debugging (whith Visual Studio) my android app (using ADB) on Virtual Machine created with Hyper-V.

Through this guide (https://bitbucket.org/chabernac/adbportforward/wiki/Home) I was able to show visual studio (installed in the virtual machine) my device (Samsung S8) as a debugging device.

The problem is that when I start debugging from the virtual machine to my device (connected in the same wifi network) I get this error:

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.

On Xamarin Diagnostic output can't see anything that can make me understand what the problem could be.

Can you help me? Thanks


Solution

  • I think you must download latest SDK platforms tools Android.