Tooth uncle tutorial is easy to understand

Failed to connect to 127.0.0.1:5555

C:\Users\Administrator>adb devices
List of devices attached
emulator-5554   device


C:\Users\Administrator>adb connect 127.0. 01.:5555
failed to connect to 127.0. 01.:5555

C:\Users\Administrator>
Copy the code

Restart ADB

C:\Users\Administrator>adb kill-server

C:\Users\Administrator>adb connect 127.0. 01.:5555
* daemon not running; starting now at tcp:5037
* daemon started successfully
failed to connect to 127.0. 01.:5555

C:\Users\Administrator>
Copy the code

Myth 2: Kill processes that occupy port 5037

C:\Users\Administrator>netstat -aon|findstr 5037
  TCP    127.0. 01.:5037         0.0. 0. 0:0              LISTENING       8896

C:\Users\Administrator>tasklist /fi "PID eq 8896"Image name PID session name session # memory use = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = adb. Exe8896 Console                    1     11.276 K

C:\Users\Administrator>taskkill /pid 8896/f Successful: the PID is terminated8896In the process.C:\Users\Administrator>netstat -aon|findstr 5037

C:\Users\Administrator>adb connect 127.0. 01.:5555
* daemon not running; starting now at tcp:5037
* daemon started successfully
failed to connect to 127.0. 01.:5555

C:\Users\Administrator>
Copy the code

Disable thunder and kill processes that occupy port 5555

C:\Users\Administrator>netstat -ano|findstr 5555
  TCP    127.0. 01.:11789        127.0. 01.:5555         SYN_SENT        16640

C:\Users\Administrator>adb kill-server

C:\Users\Administrator>netstat -ano|findstr 5555

// Turn on the thunder
C:\Users\Administrator>adb connect 127.0. 01.:5555
adb server version (31) doesn't match this client (41); killing... * Daemon started successfully failed to connect to 127.0.0.1:5555 C:\Users\Administrator>Copy the code

Final solution

After opening lightning, right click the lightning icon, expand the menu, right click the lightning icon in the menu, click Properties, copy the starting location, paste to the address bar of File Explorer, and press Enter

This opens the lightning emulator folder, which contains an adb.exe

Enter CMD in the address bar and press Enter to open CMD in the current folder.

Execute the following code

"./adb" connect 127.0. 01.:5555
Copy the code

The lightning simulator is connected successfully

D:\software\leiDian\LeiDian\LDPlayer4. 0>"./adb" connect 127.0. 01.:5555
adb server is out of date.  killing...
* daemon started successfully *
connected to 127.0. 01.:5555

D:\software\leiDian\LeiDian\LDPlayer4. 0>
Copy the code

Quotes.

Ideas are the most important, other Baidu, Bing, StackOverflow, Github, Android docs, AutoJS docs, and last but not least, ask in the group

The statement

This tutorial is intended for learning purposes only and is not intended for any other use