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

落爺英雄遲暮 提交于 2021-01-20 18:52:11

问题


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.


回答1:


  • 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.



回答2:


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.




回答3:


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




回答4:


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




回答5:


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

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. Quit Xcode and Simulator

For me solution 3 worked!




回答6:


Same error. For me running xcode-select helped:

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



回答7:


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.




回答8:


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

  1. Xcode -> Preferences
  2. In the Locations tab change the Command Line Tool pop up to the latest version.

  3. Restart Xcode and the Simulator




回答9:


I faced the same issue. Quit Xcode and Restart Mac. This worked for me.



来源:https://stackoverflow.com/questions/44624199/software-caused-connection-abort-error-returned-in-replyconnection-invalid

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!