I'm a newbie to xcode. I'm using xcode 4.3 with lion. I want to use xcodebuild in command line, but it report "no such file". I searched it with Finder, but no result.
我是xcode的新手。我正在使用带有狮子的xcode 4.3。我想在命令行中使用xcodebuild,但它报告“没有这样的文件”。我用Finder搜索了它,但没有结果。
What is this file's path? Does it exist in the Xcode.app? Can I search files in a .app package?
这个文件的路径是什么?它存在于Xcode.app中吗?我可以在.app包中搜索文件吗?
Additional info: When I typed "which xcodebuild", it return /usr/bin/xcodebuild. Enter this folder, and type xocdebuild, it still return Error:
附加信息:当我输入“which xcodebuild”时,它返回/ usr / bin / xcodebuild。输入此文件夹,并键入xocdebuild,它仍然返回错误:
Can't run /Applications/usr/bin/xcodebuild (no such file).
3 个解决方案
#1
8
The installer put mine in
安装人员把我放进去
/usr/bin/xcodebuild
You can also find it in the application bundle:
您也可以在应用程序包中找到它:
/Applications/Xcode.app/Contents/Developer/usr/bin/xcodebuild
#2
15
/usr/bin/xcodebuild
only calls the xcodebuild
command from the developer tools directory given by xcode-select
. To find out the current developer tools directory as given by xcode-select
run
/ usr / bin / xcodebuild仅从xcode-select给出的开发人员工具目录中调用xcodebuild命令。要找出xcode-select run给出的当前开发人员工具目录
xcode-select -print-path
I fixed the issue by changing that path executing
我通过改变执行路径来解决问题
sudo xcode-select -switch /Applications/Xcode.app/Contents/Developer
Which is where my developer tools are. You should change /Applications/Xcode.app
to wherever your Xcode application is.
这是我的开发人员工具的所在。您应该将/Applications/Xcode.app更改为Xcode应用程序的任何位置。
#3
0
CHeck you have it installed. The command Line Tools for the latest XCodes are optional installs. You can install them from Xcode's preferences - Downloads Tab - Components.
知道你安装了它。最新XCode的命令行工具是可选安装。您可以从Xcode的首选项 - 下载选项卡 - 组件安装它们。
#1
8
The installer put mine in
安装人员把我放进去
/usr/bin/xcodebuild
You can also find it in the application bundle:
您也可以在应用程序包中找到它:
/Applications/Xcode.app/Contents/Developer/usr/bin/xcodebuild
#2
15
/usr/bin/xcodebuild
only calls the xcodebuild
command from the developer tools directory given by xcode-select
. To find out the current developer tools directory as given by xcode-select
run
/ usr / bin / xcodebuild仅从xcode-select给出的开发人员工具目录中调用xcodebuild命令。要找出xcode-select run给出的当前开发人员工具目录
xcode-select -print-path
I fixed the issue by changing that path executing
我通过改变执行路径来解决问题
sudo xcode-select -switch /Applications/Xcode.app/Contents/Developer
Which is where my developer tools are. You should change /Applications/Xcode.app
to wherever your Xcode application is.
这是我的开发人员工具的所在。您应该将/Applications/Xcode.app更改为Xcode应用程序的任何位置。
#3
0
CHeck you have it installed. The command Line Tools for the latest XCodes are optional installs. You can install them from Xcode's preferences - Downloads Tab - Components.
知道你安装了它。最新XCode的命令行工具是可选安装。您可以从Xcode的首选项 - 下载选项卡 - 组件安装它们。