flutter adb failed to connect to 127.0.0.1:21503

1. Description of the problem
failed to connect to 127.0.0.1:xxx
**
1.1, Android SDK 1.0.41 version is unstable, it needs to be replaced with 1.0.40 (note
the place where I draw the red line ), this is unable to connect to the emulator adb Previous screenshot
Insert picture description here

1.2. This is after the android sdk is changed to version 1.0.40. Note that there is one more red line

! No devices available When this appears, the replacement is successful. Insert picture description here
Second, the solution:
2.1. Open the AndroidSDK directory \Android\Sdk\platform-tools\ and replace these three files in this directory.
Insert picture description here

If you don’t know where to put the Android SDK, go to the environment variables and find the Adnroid_Home variable. The value of the variable is the path:
Insert picture description here

File address (download it and replace it directly under the Android\Sdk\platform-tools\ directory)
---------------------Extraction code: znkj ---- -----------------

----------------------Click me to download the file------- -----------------

The work is done! ! !
Look at the renderings ( the emulator/driver can be detected ):
Insert picture description here

Guess you like

Origin blog.csdn.net/m0_43413873/article/details/108076976