How to connect with phone for debug, build... via Wifi
Question: How to connect with phone via wifi?
Connect the phone via usb cable.
Open text editor put in the following and save it as wifiConnect.bat:
cd C:\Users\Viet\AppData\Local\Android\sdk\platform-tools adb devices adb tcpip 5555 adb connect 192.168.0.113
The path is your Android SDK's path.
Port is random.
With Nexus phone, you can find out the IP address by
System settings / About phone / Status - IP address. (Important: IP address can change everytime the device is reconnected to the network so edit wifiConnect.bat with appropriate IP address).
Connect the phone via a USB cable and rerun wifiConnect.bat everytime restarting Android Studio.