I have a problem with adb.exe of Android Studio 3.4.
When I run the emulator, I get this error:
Emulator: emulator: ERROR: AdbHostServer.cpp:9
Check JAVA_HOME
, NODE_HOME
and ANDROID_HOME
paths in environment variables. If they are not available, set them.
Cold Boot your emulator.
Kill appium server session if it is running. Then re-run the appium server
Run your program through IDE
https://developer.android.com/studio/run/emulator-acceleration.html
I did add this AMD VM installation. Some how I feel that its working how. But few errors still exists. Few Port error has gone.
This error still there while the port access error has vanished.
Emulator: socketTcpLoopbackClientFor: error: fd 60640 above FD_SETSIZE (32768)
Surprise thing is that the same was working in Similar Laptop HP with Ryzon processor few days back. My old laptop crashed and its a new one. Different between the LT is just 8/16 GB ram. Older LT has McAfee while this has Windows defender. I added the adb.exe process in the Exclution list in Windows Defender now.
If you have any port utilizing software like Xampp, Vmware workstation, or virtual box they normally utilize the port through which the Android Studio can access the devices. Therefore,
I had this with flutter. I updated Flutter and Dart to latest version and it resolved.
I had this happen with the following Event Log entry:
Emulator: emulator: ERROR: AdbHostServer.cpp:102: Unable to connect to adb daemon on port: 5037
So I opened command prompt as administrator and ran netstat -a -b >c:\connections.txt
and found the following:
[Amazon Music Helper.exe]
TCP 127.0.0.1:5037 jbiss-PC:0 LISTENING
[adb.exe]
TCP 127.0.0.1:5037 jbiss-PC:54858 ESTABLISHED
.
.
.
[ss_conn_service.exe]
TCP 127.0.0.1:51146 jbiss-PC:5037 CLOSE_WAIT
.
.
.
[adb.exe]
TCP 127.0.0.1:54858 jbiss-PC:5037 ESTABLISHED
So I shut down Amazon Music Helper, shut down and restarted Android Studio and then launched the emulator. It works now. I'm not sure why I started having this problem today, I assume that Amazon Music Helper was involved previously and the status indicated ESTABLISHED for adb.exe, but I did, and this process cleared it up for now at least.
You need to first run adb start-server
and then run emulator -avd <avd_name>