场景:之前在AppStore安装的Xcode,由于空间占用太大,就卸载了,结果卸载完后,使用git管理项目就报错了:
git checkout master
xcrun: error: active developer path ("//Applications/Xcode.app/Contents/Developer") does not exist
Use `sudo xcode-select --switch path/to/Xcode.app` to specify the Xcode that you wish to use for command line developer tools, or use `xcode-select --install` to install the standalone command line developer tools.
See `man xcode-select` for more details.
差点又花好几个小时去App Store下载了,别慌,仔细读一读报错文案:
第一句:就是让你重新指定希望用于命令行开发工具的Xcode,前提是你还有个xcode路劲,看起来怪麻烦的
Use `sudo xcode-select --switch path/to/Xcode.app` to specify the Xcode that you wish to use for command line developer