Fix could not install *smartsocket* listener

报错详细信息

$ adb devices

error: could not install smartsocket listener: cannot bind to 127.0.0.1:5037: 通常每个套接字地址(协议/网络地址/端口)只允许使用一次。 (10048)

This application has requested the Runtime to terminate it in an unusual way.
Please contact the application’s support team for more information.
List of devices attached
adb server version (31) doesn’t match this client (39); killing…
could not read ok from ADB Server
* failed to start daemon *
error: cannot connect to daemon

报错原因

连接手机的端口号被占用, 比如: 在windows上连接手机,触发了360手机管理软件,占用了相应的端口。

解决方案

打开任务管理器,找到相关360手机软件相关进程。再次执行$adb devices 则输出正常:

List of devices attached
* daemon not running. starting it now at tcp:5037 *
* daemon started successfully *
S3V0217328000063 device

扩展

如果不是因360手机管理软件的问题,也许和其他管理软件如豌豆荚,同样会出现一样的情况。只要结束相应占用端口软件的进程就可以解决。

你可能感兴趣的:(React,React,Native,smart,listener,react-native)