首页 > 解决方案 > android sdk路径更改后adb连接错误

问题描述

我在这里尝试了类似问题的解决方案,但没有运气。我有带有 android studio 4.1.2 的 windows 10 64bit 并且在包含 android sdk 工具(从 f: 到 x:) 的磁盘的字母更改后 adb 停止工作。我更改了项目结构中的路径,并且在 sdk 工具中显示了正确的路径。

当我尝试:

adb tcpip 5555

我明白了

* daemon not running; starting now at tcp:5037
could not read ok from ADB Server
* failed to start daemon
error: cannot connect to daemon

为了

adb kill-server

我明白了

cannot connect to daemon at tcp:5037: cannot connect to 127.0.0.1:5037: 
No connection could be made because the target machine actively refused it. (10061)

为了

net start winnat

我明白了

System error 5 has occurred.
Access is denied.

如果我尝试从 avd 管理器运行模拟器,模拟器会打开,但出现错误:

Unable to create Debug Bridge: Unable to start adb server: * daemon not running; 
starting now at tcp:5037
could not read ok from ADB Server
* failed to start daemon
 error: cannot connect to daemon
'X:\ANDROID\SDKSINSTAL\platform-tools\adb.exe start-server' failed -- run manually if 
 necessary

我没有在 Windows 任务管理器中运行任何 adb,如果我尝试:

adb.exe start-server

我明白了

* daemon not running; starting now at tcp:5037
 could not read ok from ADB Server
* failed to start daemon
 error: cannot connect to daemon

有任何想法吗?

标签: androidandroid-studioadb

解决方案


推荐阅读