Android - 无法安装 *smartsocket* 侦听器 [英] Android - could not install *smartsocket* listener

查看:46
本文介绍了Android - 无法安装 *smartsocket* 侦听器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我尝试运行我的 Android 应用程序时,出现此异常:

When I try run my Android application I get this exception:

等待设备时出错:java.lang.RuntimeException: Unable to创建调试桥:无法启动 adb 服务器:错误:无法安装 smartsocket 侦听器:无法绑定到 127.0.0.1:5037:An试图以访问禁止的方式访问套接字权限.(10013) 无法从 ADB 服务器读取* 无法启动守护进程 * 错误:无法连接到守护进程 'C:\Users\XXX\AppData\Local\Android\Sdk\platform-tools\adb.exe,start-server'失败 -- 必要时手动运行

Error while waiting for device: java.lang.RuntimeException: Unable to create Debug Bridge: Unable to start adb server: error: could not install smartsocket listener: cannot bind to 127.0.0.1:5037: An attempt was made to access a socket in a way forbidden by its access permissions. (10013) could not read ok from ADB Server * failed to start daemon * error: cannot connect to daemon 'C:\Users\XXX\AppData\Local\Android\Sdk\platform-tools\adb.exe,start-server' failed -- run manually if necessary

所以我尝试使用以下命令手动执行:

So I try do it manualy with these commands:

adb kill-server

adb kill-server

  • 响应:* 服务器未运行 *
  • adb start-server

    adb start-server

    • 响应是下一个异常:
    • *守护进程没有运行.现在在端口 5037 上启动它 * 错误:无法安装 smartsocket 侦听器:无法绑定到 127.0.0.1:5037:An试图以访问禁止的方式访问套接字权限.(10013) 无法从 ADB 服务器读取 ok

      *daemon not running. starting it now on port 5037 * error: could not install smartsocket listener: cannot bind to 127.0.0.1:5037: An attempt was made to access a socket in a way forbidden by its access permissions. (10013) could not read ok from ADB Server

      *无法启动守护进程*错误:无法连接到守护进程

      *failed to start daemon * error: cannot connect to daemon

      我在我的任务管理器中寻找 adb 进程但没有运行.有任何想法吗?谢谢.

      I looking for adb process in my task manager but not running. Any ideas? Thanks.

      推荐答案

      如果您遇到这种情况不断发生并且杀死并重新启动仍然不起作用的情况,则可能是您的 adb 安装有问题.我不得不重新安装 adb 来解决这个问题:

      If you have the situation where this keeps happening and killing and restarting still doesn't work it may be a problem with your adb installation. I had to reinstall adb to resolve this problem:

      1. 重新启动以确保没有 adb 实例正在运行
      2. 在 Android Studio 中启动 SDK 管理器:工具->Android->SDK 管理器
      3. 选择 SDK 工具选项卡
      4. 取消选择 Android SDK Platform-Tools 项
      5. 点击应用
      6. 检查屏幕日志以确保卸载成功并且 SDK/platform-tools 文件夹为空.

      这应该从您的 SDK 中完全删除 adb.

      This should completely remove adb from your SDK.

      1. 现在重新选择 Android SDK Platform-Tools 项
      2. 点击申请
      3. 检查安装成功的屏幕日志.

      我怀疑在我的情况下,平台工具的更新失败了,可能是因为它未能杀死正在运行的 adb.exe 并且只应用了部分更新,导致 adb 安装不稳定.

      I suspect in my case an update of the platform tools had failed perhaps because it failed to kill a running adb.exe and only a partial update was applied resulting in an unstable adb installation.

      这篇关于Android - 无法安装 *smartsocket* 侦听器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆