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


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 就沒問題了。

 

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

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

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM