简体   繁体   English

Xcode 9.1 / 9.2 Beta在启动时立即崩溃

[英]Xcode 9.1/9.2 beta immediately crashes on launch

A few days ago, when I would open my Xcode project and navigate to the storyboard, Xcode would hang and then ultimately not respond and then I would have to force quit. 几天前,当我打开我的Xcode项目并导航到情节提要时,Xcode会挂起,然后最终不响应,然后我不得不强制退出。 I looked up the issue and saw a suggestion to delete ~/Library/Developer folder... now the Xcode window doesn't even appear . 我查了一下这个问题,看到了删除〜/ Library / Developer文件夹的建议... 现在Xcode窗口甚至都没有出现 The application just immediately crashes without opening. 该应用程序只是立即崩溃而没有打开。

Steps I've taken, in chronological order: 我按照时间顺序执行的步骤:

  • Deleted and reinstalled Xcode > did not solve 删除并重新安装Xcode>无法解决
  • Upgraded from macOS Sierra to High Sierra > did not solve 从macOS Sierra升级到High Sierra>没有解决
  • Tried both Xcode 9.1 and 9.2 beta > did not solve 尝试了Xcode 9.1和9.2 beta>没有解决
  • Reinstalled Command Line Tools > did not solve 重新安装了命令行工具>无法解决

Still nothing. 依然没有。 I do have a 2011 MacBook Pro, and I'm wondering if it may just be an issue with my machine, or if it is indeed a result of losing ~/Library/Developer. 我确实有2011年的MacBook Pro,但我想知道这可能只是机器问题,还是确实是因为丢失〜/ Library / Developer而导致的。

Any suggestions on how to recover necessary files or successfully open Xcode are appreciated. 任何有关如何恢复必要文件或成功打开Xcode的建议,我们深表感谢。

I had the same problem. 我有同样的问题。 In fact like you I also manually deleted the Developer folder (then I took a step further and like an idiot I also emptied the trash). 实际上,像您一样,我也手动删除了Developer文件夹(然后,我又走了一步,像个白痴一样,我也清空了垃圾箱)。

There is an easier way of fixing this problem than asking someone for their copy of PrivateFrameworks folder. 解决此问题的方法比向某人索取PrivateFrameworks文件夹的副本要简单得多。 You can just run XcodeSystemResources.pkg in order to setup PrivateFrameworks for you. 您可以只运行XcodeSystemResources.pkg来为您设置PrivateFrameworks。

XcodeSystemResources.pkg

https://forums.developer.apple.com/thread/88570 https://forums.developer.apple.com/thread/88570

I didn't reinstall the Xcode 9 but just ran the package /Applications/Xcode.app/Contents/Resources/Packages/XcodeSystemResources.pkg. 我没有重新安装Xcode 9,而是运行了/Applications/Xcode.app/Contents/Resources/Packages/XcodeSystemResources.pkg软件包。 And the Xcode 9 started to work. Xcode 9开始工作。

XcodeSystemResources.pkg is supposed to be installed on the initial launch of Xcode.app. XcodeSystemResources.pkg应该在Xcode.app的首次启动时安装。 Can you explain why that wasn't the case? 您能解释为什么不是这种情况吗? Did you manually delete /Library/Developer/PrivateFrameworks/CoreSimulator.framework? 您是否手动删除了/Library/Developer/PrivateFrameworks/CoreSimulator.framework? If you delete that after the first launch, Xcode doesn't know to reinstall those packages for you. 如果您在首次启动后将其删除,则Xcode不会为您重新安装这些软件包。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM