How can I resolve “Error: No developer directory found at /Developer”?

牧云@^-^@ 提交于 2019-11-28 13:46:11

问题


I just upgraded XCode to 4.3.1. I'm using a script to build (and then deploy through Testflight) my app. But I now receive this error:

Error: No developer directory found at /Developer. Run /usr/bin/xcode-select to update the developer directory path.

I've no /Developer dir in my machine: how can I fix it?


回答1:


sudo xcode-select -switch /Applications/Xcode.app/Contents/Developer




回答2:


You could also do this instead ...

sudo ln -s /Applications/Xcode.app/Contents/Developer /Developer



回答3:


Everything you guys answered is correct. But for those who hit the following error are missing a step:

Error:

  "xcode-select: Error: Path "/Applications/Xcode.app/Contents/Developer" is not a directory."

Missing step:

Double click your xcode 432.dmg. Now don't double click the xcode.app to use it. Instead copy it /Applications folder and then open it from there to install xcode.

Now use terminal command

 sudo xcode-select -switch /Applications/Xcode.app/Contents/Developer

Thats it. Your error won't happen again and Filemerge will work now.




回答4:


This solved for me:

Mostly this error occurs when you have installed a newer version of xcode. And the command line tools are yet to be initialized.

To resolve this: Go under Xcode Preferences > Locations (tab) > And the bottom options is Command Line Tools. Please select the Xcode version for tools.

Example (For Xcode 8.3.3): Go under Xcode Preferences > Locations (tab) > And the bottom options is Command Line Tools. Select Xcode 8.3.3 (7D1014).



来源:https://stackoverflow.com/questions/9621706/how-can-i-resolve-error-no-developer-directory-found-at-developer

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