iOS 开发 两个Xcode pod install 报问题

Mac上有两个Xcode,一个是正式版,另一个安装的测试版,pod install的时候发现报错,找不到对应的Xcode,错误如下:

Setting up CocoaPods master repo
  $ /usr/bin/git remote set-url origin https://github.com/CocoaPods/Specs.git
  xcrun: error: active developer path ("/Applications/Xcode.app/Contents/Developer") does not exist, use `xcode-select --switch path/to/Xcode.app` to specify the Xcode that you wish to use for command line developer tools (or see `man xcode-select`)
  [!] Failed: /usr/bin/git remote set-url origin https://github.com/CocoaPods/Specs.git
  $ /usr/bin/git checkout master
  xcrun: error: active developer path ("/Applications/Xcode.app/Contents/Developer") does not exist, use `xcode-select --switch path/to/Xcode.app` to specify the Xcode that you wish to use for command line developer tools (or see `man xcode-select`)
  [!] Failed: /usr/bin/git checkout master
[!] Unable to add a source with url `https://github.com/CocoaPods/Specs.git` named `master-1`.
(The `master` repo is not a git repo.)
You can try adding it manually in `~/.cocoapods/repos` or via `pod repo add`.


经百度查找,了解如下可以解决此问题:

sudo xcode-select --switch /Applications/Xcode.app
最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
【社区内容提示】社区部分内容疑似由AI辅助生成,浏览时请结合常识与多方信息审慎甄别。
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

相关阅读更多精彩内容

友情链接更多精彩内容