2021-03-15 Finished with error: Failed to bind web development server: SocketException: Failed to...

flutter 运行web 报错:
Finished with error: Failed to bind web development server:
SocketException: Failed to create server socket (OS Error: Failed to start accept), address = localhost, port = 64357

在需要确定端口,在flutter project下运行下面代码

flutter run -d chrome --web-port=8080 --web-hostname=127.0.0.1

chrome 可以换成需要使用的浏览器如edge
以及 8080也可以换成另外的端口

目前只找到这种临时办法、如有更好的办法,感谢告知!

你可能感兴趣的:(2021-03-15 Finished with error: Failed to bind web development server: SocketException: Failed to...)