设置“xcode-select -switch”后,Xcode停止工作。 [英] Xcode stops working after set "xcode-select -switch"

查看:190
本文介绍了设置“xcode-select -switch”后,Xcode停止工作。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

OMG,我做了什么?



几天前,我尝试使用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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆