1. 程式人生 > >解決android sdk 運行出現 could not install *smartsocket* listener: cannot bind to 127.0.0.1:5037:的問題

解決android sdk 運行出現 could not install *smartsocket* listener: cannot bind to 127.0.0.1:5037:的問題

rom conn cat img android平臺 允許 can style 記錄

ionic3項目,在添加android平臺後,cordova run android 出現 以下問題:

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.
could not read ok from ADB Server
* failed to start daemon *
error: cannot connect to daemon

具體原因是 5037端口被占用了。

打開命令提示符輸入以下:

 netstat -aon|findstr 5037

技術分享

讓我們看看進程的具體描述

tasklist /fi "PID eq 2880"

技術分享

強制退出進程

taskkill /pid 5008 /f

技術分享

再重啟一下adb

adb start-server

技術分享

當我再運行cordova run android 就沒問題了。

此隨筆乃本人學習工作記錄,如有疑問歡迎在下面評論,轉載請標明出處。

如果對您有幫助請動動鼠標右下方給我來個贊,您的支持是我最大的動力。

解決android sdk 運行出現 could not install *smartsocket* listener: cannot bind to 127.0.0.1:5037:的問題