[Hbuilder+ Night God Simulator] The pit encountered during the connection process

1. Installation

HBuilder X official website click here,
choose the version that suits you,
insert image description here
double-click to run directly
insert image description here

Poke here on the official website of Yeshen Simulator,
choose the version that suits you,
insert image description here
double-click to run directly
insert image description here

2. Configuration in Hbuilder

Open Tools-Settings-Run Configuration
adb path, you can click Browse on the right to find nox_adb.exe under the bin folder, the Android emulator port defaults to 62001, because my local port 62001 is occupied, so I use 54269 if 62001 is not
insert image description here
available If it works, win+r opens the cmd command prompt, enter netstat -ano,
if there is 127.0.0.1:62001 in the local locale, it means it is occupied, replace it with an unused port
insert image description here

3. Add environment variables

Click the start icon and directly search for "edit system environment variables" in the input box
insert image description here
insert image description here
insert image description here

4. Check the connection status of the Yeshen simulator

adb connect 127.0.0.1:62001
adb devices
insert image description here

5. Run the project

There will be npm install for the first time, click to install dependencies
insert image description here
After installing dependencies
insert image description here
6, the pit encountered: Hbuilder prompt: no mobile phone or emulator detected

insert image description here
In the case of ensuring that the above operations are correct, the reason I encountered this bug is that Hbuilder has not been updated to the latest version

Open Hbuilder, the lower right corner will prompt whether to update to the latest version, there is no point at the beginning, and I have been looking for the source of the problem

When I chose to update, it installed more than 20 plug-ins. After the installation was successful, I tried again and it was successful.

Guess you like

Origin blog.csdn.net/weixin_49668076/article/details/132194698