设置“xcode-select -switch”后,Xcode停止工作。 [英] Xcode stops working after set "xcode-select -switch"
问题描述
几天前,我尝试使用macport安装一些东西,因为我正在使用Xcode 4.3并且当时还没有安装命令行工具, macport无法正常工作。所以我按照一些指南来安装命令行工具,然后使用以下命令:
sudo xcode-select -switch / Applications / Xcode.app /
我认为除了macport之外的一切都搞砸了:现在,在Xcode,甚至是简单的单视图iOS项目不会被编译,它说未找到UIKit / UIKit.h。
有谁知道如何纠正这个问题?我不想再重新安装巨大的Xcode,今晚要做一些iOS项目,帮忙!
你应该将它指向 Developer
目录,而不是Xcode应用程序包。运行:
sudo xcode-select --switch /Applications/Xcode.app/Contents/Developer
OMG, what I've done?
Couple of days ago, I tried using macport to install something, because I'm using Xcode 4.3 and the command-line tool hadn't been installed by the time, macport wouldn't work. So I followed some guide to get command-line tool installed, then I used following command:
sudo xcode-select -switch /Applications/Xcode.app/
which I think screwed everything except macport: now, in Xcode, even a simple single-view iOS project won't be compiled, it says "UIKit/UIKit.h not found".
Does anyone know how to correct this? I don't want to re-install the gigantic Xcode again, gotta do some iOS project tonight, help!
You should be pointing it towards the Developer
directory, not the Xcode application bundle. Run this:
sudo xcode-select --switch /Applications/Xcode.app/Contents/Developer
这篇关于设置“xcode-select -switch”后,Xcode停止工作。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!