Mac Angular打包报错xcode-select: error: tool 'xcodebuild' requires Xcode

Mac Angular打包报错:node

Error: xcode-select: error: tool 'xcodebuild' requires Xcode, but active developer directory '/Library/Developer/CommandLineTools' is a command line tools instanceios

Angular项目运行,打包需安装环境以下:gulp

1:安装node(本身去官网下载指定版本安装,Angular1.0这种过期的项目是不支持高版本node的),cordova,gulp等。xcode

2:安装xcode。app

     运行打包命令:gulp build:ios:release 报错如上所述,因为咱们在苹果商店下载的程序安装在Applications目录,与/Library/Developer/CommandLineTools目录不一致。ui

 

解决方案:spa

使用如下命令把 xcode 的路径修改成你安装的位置便可code

sudo xcode-select --switch /Applications/Xcode.app/Contents/Developer
相关文章
相关标签/搜索