HBuilder Android real machine debugging wireless connection
Preparation
Prepare the following first:
- ADB toolkit;
- Hbuilder;
- Android phone ;
hbuilderx configuration adb path
-
Open [hbuilderx] and you can find [Settings] under [Tools] in the menu bar.
-
On the left, see [Run Configuration] properties, click and press.
-
Find [adb path] in the window for custom configuration.
Real machine debugging wireless connection
- The Android device enables USB debugging and connects to the computer via a USB cable. (USB stay connected)
- cd to the adb directory
cmd
The command executes the following commandadb tcpip 5555
to make the phone listen to this port.cmd
The command executes the following commandadb connect 192.168.2.157
(192.168.2.157 is the IP address of the Android device. Pay attention to the mobile phone pop-up window)- runHBuilderproject
- Unplug the USB cable, adb throughwifiDebug Android devices.
- If you need to restore to the USB data cable, you can enter it on the command line
adb usb
, or you canadb disconnect 192.168.2.157:5555
Notice
- Android devices need to enable USB debugging.
- The Android device must be on the same LAN as the PC.
- After the adb wifi connection is successful, the USB cable should be pulled out, otherwise there will be a problem that adb connects to two devices at the same time.
- You may need to re-enable USB debugging after executing the command
adb tcpip 5555
.- available at
chrome://inspect/#devices