Android emulator errors (socketTcpLoopbackClientFor and AdbHostServer.cpp)

雨燕双飞 提交于 2020-06-23 04:30:12

问题


I just installed Android Studio (Windows) and I created a google pixel 3 XL, API 29, no play store installed. When I launch an hello word application, I get these 2 errors:

Emulator: socketTcpLoopbackClientFor: error: fd 52252 above FD_SETSIZE (32768)
Emulator: emulator: ERROR: AdbHostServer.cpp:102: Unable to connect to adb daemon on port: 5037

For what concerning the first error, I tried this Problem with the emulator since the update but it didn't work.


回答1:


If you're using an AMD processor, you must activate "Android Emulator Hypervisor Driver for AMD Processors" included in SDK Tools.

After this, the emulator operates normally. If error is present yet, it don't stop the emulation




回答2:


I am not sure if it is helpfull but I will share my experience as a possible answer. I struggled for three days trying to face a very similar issue as yours. And in my case it was working properlly until that. I created a question here but I din't get answer yet. Well, I tried all I found around. Then I read somewhere someone facing issues with emulator and just downground it and it fixed it. I just tried downgraded from Android 10+ to Android 10 and to API #29 and I got a complete diferent issue. Than I tried again to Android 9 and API #28 and it fixed my issue.

One more thing it can be usefull. I noted that before I downgraded Android/API I had many more for this list

C:\Users>netstat -ano | findstr "5037"
  TCP    127.0.0.1:5037         0.0.0.0:0              LISTENING       7892
  TCP    127.0.0.1:5037         127.0.0.1:49735        ESTABLISHED     7892
  TCP    127.0.0.1:5037         127.0.0.1:51843        ESTABLISHED     7892
  TCP    127.0.0.1:5037         127.0.0.1:51855        ESTABLISHED     7892
  TCP    127.0.0.1:5037         127.0.0.1:51859        ESTABLISHED     7892
  TCP    127.0.0.1:5037         127.0.0.1:51867        ESTABLISHED     7892
  TCP    127.0.0.1:49735        127.0.0.1:5037         ESTABLISHED     9604
  TCP    127.0.0.1:51843        127.0.0.1:5037         ESTABLISHED     13184
  TCP    127.0.0.1:51855        127.0.0.1:5037         ESTABLISHED     9604
  TCP    127.0.0.1:51859        127.0.0.1:5037         ESTABLISHED     9604
  TCP    127.0.0.1:51867        127.0.0.1:5037         ESTABLISHED     9604

And maybe checking you SDk Tools installed can help also




回答3:


  1. Install the following stuff I mentioned in the pic.
  2. Make sure you are using any nexus emulator which is good for a performance boost.
  3. Update the plugins frequently to avoid these errors.

More Info



来源:https://stackoverflow.com/questions/62000072/android-emulator-errors-sockettcploopbackclientfor-and-adbhostserver-cpp

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!