xcode 软件导致连接中止。回复错误:连接无效

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/44624199/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-15 10:03:37  来源:igfitidea点击:

Software caused connection abort. Error returned in reply:Connection invalid

iosxcode

提问by Kumar Utsav

My Xcode 9 gives the message to which I don't know how to respond. I want to run the app to my simulator, and I am getting this weird message. Attaching the snapshot for the same. enter image description here

我的 Xcode 9 给出了我不知道如何回应的消息。我想在我的模拟器上运行应用程序,但我收到了这条奇怪的消息。附上相同的快照。 在此处输入图片说明

回答by Vishal Rajole

  • If you are using two versions of Xcode, remove one or quit all Xcode and simulators.
  • Go to preferences and Set proper version for command line tools
  • click on Derived Data, go to Derived data and delete that folder or simply use rm -rf ~/Library/Developer/Xcode/DerivedData
  • Click on Simulator reset content settings and just quit XCode and simulator and open clear and build the Xcode and run it.
  • 如果您使用两个版本的 Xcode,请删除一个或退出所有 Xcode 和模拟器。
  • 转到首选项并为命令行工具设置正确的版本
  • 单击派生数据,转到派生数据并删除该文件夹或简单地使用 rm -rf ~/Library/Developer/Xcode/DerivedData
  • 单击模拟器重置内容设置,然后退出 XCode 和模拟器并打开清除并构建 Xcode 并运行它。

回答by wheeliebin

Swapping between 2 versions of Xcode (8.3.3 and 9 GM) gave me this problem in Xcode 9. Solved by Xcode->Preferences->Locations->Command Line Tools, set to Xcode 9. Needed to quit Xcode and the simulator, but it then worked.

在 Xcode 9 的 2 个版本(8.3.3 和 9 GM)之间交换给了我这个问题。通过 Xcode->Preferences->Locations->Command Line Tools 解决,设置为 Xcode 9。需要退出 Xcode 和模拟器,但它后来奏效了。

回答by Piyush

Restart Xcode & Simulator. delete the app from simulator make clean & try to deploy again. it works for me.

重新启动 Xcode 和模拟器。从模拟器中删除应用程序 make clean 并尝试再次部署。这个对我有用。

回答by Robert

I had the same issue:

我遇到过同样的问题:

Try to: - kill simulator (force quit)

尝试: - 杀死模拟器(强制退出)

if it won't work, restart mac - it is funny but for me it worked

如果它不起作用,请重新启动 mac - 这很有趣,但对我来说它有效

回答by Jayprakash Dubey

It seems that there is error while Xcode is trying to connect with Simulator/Devicein order to run app.

Xcode 尝试连接模拟器/设备以运行应用程序时似乎出现错误

Screenshot 1

截图 1

So there are multiple solution to this issue :

所以这个问题有多种解决方案:

  1. Clean project(shortcut : cmd + shift + k) / Clean Build project(shortcut : cmd + shift + alt + k)

  2. Delete derived data content(Open Xcode preference using cmd + comma). Goto Location tab. In Derived Data section press on arrow symbol.

  1. 清理项目(快捷方式:cmd + shift + k)/清理构建项目(快捷方式:cmd + shift + alt + k)

  2. 删除派生数据内容(使用 cmd + 逗号打开 Xcode 首选项)。转到位置选项卡。在派生数据部分按箭头符号。

Screenshot 2

截图 2

  1. Quit Xcodeand Simulator
  1. 退出 Xcode和模拟器

For me solution 3 worked!

对我来说,解决方案 3 有效!

回答by Solayman Rana

I face the same issue. Quit Xcodeand Restart Mac Work for me

我面临同样的问题。退出Xcode并重新启动 Mac 对我来说有效

回答by Divya MG

This is because you have multiple versions of Xcode in your system. Just quit all the other versions of xcode and also the simulators. Restart the required version of Xcode and it should work.

这是因为您的系统中有多个版本的 Xcode。只需退出所有其他版本的 xcode 以及模拟器。重新启动所需版本的 Xcode,它应该可以工作。

回答by Conor

You need to select the latest version of the command line tools in the preference pane.

您需要在首选项窗格中选择最新版本的命令行工具。

  1. Xcode -> Preferences
  2. In the Locationstab change the Command Line Tool pop up to the latest version. enter image description here

  3. Restart Xcode and the Simulator

  1. Xcode -> 首选项
  2. Locations选项卡中,将弹出的命令行工具更改为最新版本。 在此处输入图片说明

  3. 重启 Xcode 和模拟器

回答by Sebastian

Same error. For me running xcode-selecthelped:

同样的错误。对我来说跑步有xcode-select帮助:

sudo xcode-select -s /Applications/Xcode-beta.app/Contents/Developer/