如何修复 Android Studio 中的 adb.exe 崩溃/重启循环

问题描述 投票:0回答:1

在 Windows 7 上全新安装 Android Studio(Studio 内部版本:2022.3.1 补丁 2)时,adb.exe 将在启动时运行。

adb.exe 34.0.5
无法启动(崩溃)服务器,然后“永远”重试(循环重新启动)。虽然 Android Studio 不再支持 Windows 7,但我有另一台 Windows 7 机器,
adb.exe 34.0.5
可以正常工作。在发生故障的机器上,循环重启如下所示:

Adb connection Error:Connection reset
Cannot reach ADB server, attempting to reconnect.

* daemon not running; starting now at tcp:5037
could not read ok from ADB Server
* failed to start daemon
error: cannot connect to daemon
'C:\Users\Admin\AppData\Local\Android\Sdk\platform-tools\adb.exe start-server' failed -- run manually if necessary

* daemon not running; starting now at tcp:5037
could not read ok from ADB Server
* failed to start daemon
error: cannot connect to daemon
'C:\Users\Admin\AppData\Local\Android\Sdk\platform-tools\adb.exe start-server' failed -- run manually if necessary

我关闭了 Android Studio,并在命令提示符中(注意:使用您自己的位置作为平台工具所在的位置),执行了以下操作:

c:\> set ADB_TRACE=all
c:\> "C:\Users\Admin\AppData\Local\Android\Sdk\platform-tools\adb.exe" version
c:\> "C:\Users\Admin\AppData\Local\Android\Sdk\platform-tools\adb.exe" kill-server
c:\> "C:\Users\Admin\AppData\Local\Android\Sdk\platform-tools\adb.exe" server nodaemon

服务器命令崩溃了

adb.exe : sysdeps_win32.cpp:602 _socket_set_errno: mapping Windows error code 10061 to errno 22
服务器没有按照预期继续运行。

添加注册表项:

Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\Windows Error Reporting\LocalDumps\adb.exe]
"DumpFolder"=hex(2):43,00,3a,00,5c,00,43,00,72,00,61,00,73,00,68,00,44,00,75,00,6d,00,70,00,73,00,00,00

产生以下结果:

This dump file has an exception of interest stored in it.
The stored exception information can be accessed via .ecxr.
(6dc.1e2c): Unknown exception - code 40000015 (first/second chance not available)
eax=00000000 ebx=0045ee58 ecx=00000000 edx=00000000 esi=00000002 edi=00000000
eip=770d015d esp=0045ee08 ebp=0045eea4 iopl=0         nv up ei pl zr na pe nc 
cs=0023  ss=002b  ds=002b  es=002b  fs=0053  gs=002b             efl=00000246
ntdll!NtWaitForMultipleObjects+0x15:
770d015d 83c404          add     esp,4

此 SO 参考可能与上述故障转储相关:https://stackoverflow.com/a/6079307

我尝试升级“Universal C Runtime”,如下所示:https://support.microsoft.com/en-ca/help/2999226/update-for-universal-c-runtime-in-windows,但是没有改变症状。

怎样才能让adb.exe在这个系统上运行而不崩溃?

android-studio crash adb
1个回答
0
投票

从此位置下载以前版本的 adb.exe:

https://dl.google.com/android/repository/platform-tools_r34.0.4-windows.zip(请注意,此处提供了以前版本的列表:https://developer.android.com/tools /发布/平台工具

platform-tools
的备份保存在某处,然后将早期 adb 版本的内容提取到您的
platform-tools
位置。

下次启动 Android Studio 时,adb.exe 应该会启动而不会崩溃。

该错误已关闭,因为不支持 Windows 7:https://issuetracker.google.com/issues/308035747

© www.soinside.com 2019 - 2024. All rights reserved.