相关疑难解决方法(0)

无法绑定到地址(已在使用中)错误与 Visual Studio Mac API

我正在尝试通过 .Net Core 创建一个 Web API。我只是使用样板 ValuesController 作为 Hello World。当我运行项目时,出现以下错误:

System.IO.IOException: "Failed to bind to address https://127.0.0.1:5001: address already in use." ---> System.Exception {Microsoft.AspNetCore.Connections.AddressInUseException}: "Address already in use" ---> System.Exception {System.Net.Sockets.SocketException}: "Address already in use"
  at at System.Net.Sockets.Socket.UpdateStatusAfterSocketErrorAndThrowException(SocketError error, String callerName)\n   at System.Net.Sockets.Socket.DoBind(EndPoint endPointSnapshot, SocketAddress socketAddress)\n   at System.Net.Sockets.Socket.Bind(EndPoint localEP)\n   at Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets.SocketTransport.BindAsync()
  --- End of inner exception stack trace ---
  at at Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets.SocketTransport.BindAsync()\n   at Microsoft.AspNetCore.Server.Kestrel.Core.KestrelServer.<>c__DisplayClass22_0`1.<<StartAsync>g__OnBind|0>d.MoveNext()\n--- End of stack trace from previous location where exception was thrown ---\n   at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.AddressBinder.BindEndpointAsync(ListenOptions endpoint, AddressBindContext …
Run Code Online (Sandbox Code Playgroud)

macos visual-studio .net-core

14
推荐指数
8
解决办法
3万
查看次数

Android Studio错误:无法连接到守护程序

我已经使用AS几个月了,但是自从两天以来,尝试运行我的应用程序时出现错误:

Unable to run 'adb': null
'C:\Users\lapof\AppData\Local\Android\Sdk\platform-tools\adb.exe start-server' failed -- run manually if necessary
* daemon not running; starting now at tcp:5037
could not read ok from ADB Server
* failed to start daemon
error: cannot connect to daemon
Run Code Online (Sandbox Code Playgroud)

我读过很多人遇到此问题的信息,但是提供的解决方案对我不起作用。我特别阅读以下问题:

这些问题的很多答案都说要从任务管理器中关闭adb.exe,问题是adb.exe没有运行,如果我尝试通过.\adb start-server在PowerShell窗口中键入来重新启动它,则会遇到相同的错误。

我也尝试重新启动我的PC,但是它不起作用。在我要连接的Android设备上(三星Galaxy S8),我启用了USB调试功能。我什至尝试删除所有授权的设备,但没有任何效果。

我检查了其他进程是否使用了5037端口,但adb.exe使用了5037端口(并且该端口的防火墙状态是允许的,但不受限制)。顺便说一句,正如我所说,在任务管理器中没有adb.exe。

最后,我尝试遵循我所链接的最后一个问题中提供的说明(基本上,我重新下载了adb.exe)。最初我跑了.\adb start-server,出现了这个奇怪的错误:

* daemon not running. starting it now on port 5037 *
* daemon started successfully *
** daemon …
Run Code Online (Sandbox Code Playgroud)

android adb android-studio

5
推荐指数
6
解决办法
1万
查看次数

标签 统计

.net-core ×1

adb ×1

android ×1

android-studio ×1

macos ×1

visual-studio ×1