could not connect to tcp:5037: cannot connect to 127.0.0.1:5037: No connection could be made because the target machine actively refused it. (10061)
make sure you have installing your device driver and adb
serviceand is activated USB debugging in android device -> setting -> developer options
and must be could to see your device when you connected by USB port ( by this command : adb devices
)
so when you connected by USB follow this Commands :
1-stay connect via USB
2-connect to your WIFI network (computer and mobile device both)
3-ping DeviceIP
(must be have ping to your device)
4- adb kill-server
5-adb usb
6-adb tcpip 5556
7-adb connect "yourDeviceIP:5556"
8-adb devices
(must be see two device names , one of them is by deviceIP:5556)
9-unplug USB cable
then it's Done! and you could to test your app
In my computer, it is releated to Hyper-V, I have to completely disabled it. Then the ports like 5037,5055,8080 and so on are avaliable.
See more on https://petri.com/how-to-disable-hyper-v-completely-in-windows-10, https://www.poweronplatforms.com/enable-disable-hyper-v-windows-10-8/.
DO NOT FORGET bcdedit /set hypervisorlaunchtype off
!!!