Study notes-the specific process of connecting HBuilder to the night god simulator

In Android app development, sometimes we may not have a real machine to debug the program. At this time, we can use the simulator to implement debugging. The main thing here is the configuration of the night god simulator environment.


1. Download and install the tools: 

1. Night God Simulator: https://www.yeshen.com/

2.HBuilderX:https://www.dcloud.io/hbuilderx.html

No need to worry, just install it with a fool. Note the installation location.

2. Configure environment variables:

Find the location of the downloaded HBuilderX file, and configure the following file addresses as environment variables.

 Find the location of the downloaded Night God Simulator, and configure the following file addresses as environment variables.

 

After configuring the environment variables, you can use some commands such as adb.

3. Open the night god emulator and HBuilderX, and configure the Android port:

Click to enter the Android emulator port settings. And set the Android emulator port to 62001.

 

4. HBuilderX connects to the night god simulator:

Only after the connection is completed, can you see the device number in the following locations where the mobile phone or emulator is not detected . Just click the first one to run.

1) Go to the Program Files\Nox\bin folder of the Night God Simulator and open the command window. Enter the following command:

nox_adb connect 127.0.0.1:62001
nox_adb devices

2) Enter the HBuilderX\plugins\launcher\tools\adbs folder of HBuilderX and open the command window. Enter the following command:

adb connect 127.0.0.1:62001
adb devices

 After entering the above command, you should be connected. You can check the above location to see if the device number is detected, if not. Restart HBuilderX and the night god simulator. If it still doesn't, enter the above command again to see if the returned information shows whether the connection is successful.


When starting the real machine test, first install the HBuilder base on the Night God simulator. You can see if the installation is successful. If you can't connect, you can go and see what other people say.

Guess you like

Origin blog.csdn.net/qq_41339126/article/details/113394276