连接到模拟器的Xcode错误“软件导致连接中止"; [英] Xcode error connecting to simulator "Software caused connection abort"
问题描述
当我尝试通过Xcode模拟器运行项目时,它始终显示错误软件导致连接中止".
When I try to run my project through the Xcode simulator, it keeps giving me the error "Software caused connection abort".
尝试重新启动模拟器& Xcode,我最近删除了DerivedData文件夹如本博文中有关破碎的游乐场的建议所示,因此也无济于事. /p>
Tried restarting the simulator & Xcode, and I recently deleted the DerivedData folder as suggested in this post about broken playgrounds so that also didn't help.
推荐答案
快速修复
之所以会这样,是因为您安装了多个版本的Xcode.不幸的是,MacOS一次仅支持运行一个Xcode版本,它需要知道当前运行版本的位置.要解决问题,请选择以下选项之一:
This is happening because you have multiple versions of Xcode installed. MacOS unfortunately only supports running one version of Xcode at a time, and it needs to know the location of the currently running version. To sort things out, choose one of the following:
退出所有Xcode实例并重新启动它
如果还不能解决,请尝试以下其他选项之一.
Try one of the other options below if that hasn't solved it.
使用命令行:
-
运行
sudo xcode-select --switch /Applications/your_custom_folder_if_needed/Xcode.app
重新启动您的终端和Xcode,它将正常工作.
Restart your terminal and Xcode and it will work just fine.
无命令行用户:
- 退出Xcode的所有实例
- 启动要使用的Xcode实例
- 转到Xcode->首选项->位置
- 在命令行工具中选择正确的版本
- 完成!
这篇关于连接到模拟器的Xcode错误“软件导致连接中止";的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!