无法在Android Studio中启动ADB服务器
环境:
Windows 10 Pro
Android Studio Bumblebee 2021.1.1 Patch 2
Android SDK Platform-tools 33.0.1 (adb)
首先我需要提到的是,问题发生在我的一台笔记本电脑上。只有这台笔记本电脑有这个问题,这很奇怪。这也不是因为 genymotion 的事情。端口 5037 没有被占用,我尝试了各种解决方案,例如终止 adb 进程并重新启动、删除 .android 文件夹、重新安装所有内容等等...
问题:
每次启动 android 时studio,它会自动尝试启动adb服务器。但是任务管理器中出现了两个 adb 进程,
并且 android studio 中的事件日志不断打印以下内容:
'...\AppData\Local\Android\Sdk\platform-tools\adb.exe start-server'失败 - 如果需要手动运行
然后它会重复一遍又一遍。
我也尝试过在不同的端口(例如 5038)上启动 adb 服务器,但大多数情况下仍然无法正常工作。
但是,我确实成功启动了两次adb服务器,一次是在删除.android文件夹后,另一次是在将adb端口更改为5038后。我不知道为什么它突然起作用了,而且用不了多久就可以了几个小时后,又开始出现故障。
经过一番绝望的挣扎后我仍然无法弄清楚...我想知道是否有人有同样的情况。如果您需要进一步澄清某些事情,请告诉我。任何帮助表示赞赏!
Environment:
Windows 10 Pro
Android Studio Bumblebee 2021.1.1 Patch 2
Android SDK Platform-tools 33.0.1 (adb)
Firstly I need to mention that the problem happened on one of my laptop. Only this laptop have this issue, which is strange. Also it's not because of the genymotion thing. Port 5037 is not occupied and I've tried all sorts of solutions such as killing adb process and restart, deleting the .android folder, reinstalling everything and so on...
Problem:
Every time I start android studio, it will automatically try to start the adb server. But TWO adb processes appear in the task manager,
and the event log in android studio keeps printing this:
'...\AppData\Local\Android\Sdk\platform-tools\adb.exe start-server' failed -- run manually if necessary
Then it will repeat over and over again.
I've also tried to start the adb server on different ports like 5038, it still doesn't work for most of the time.
However, I did succeed starting the adb server for twice, one after I deleted the .android folder and the other after I changed the adb port to 5038. I don't know why it suddenly worked and it won't be long before it starts to malfunction again, like after several hours.
I still cannot figure it out after a desperate struggle... I'm wondering if anyone has the same situation. If you need further clarification on something let me know. Any help is appreciated!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
最近我发现Windows更新KB5013942导致了这个问题。卸载该补丁即可解决。它只发生在某些电脑上。
Recently I found that windows update KB5013942 caused this problem. Uninstalling that patch will solve it. It only happened to certain PCs.