xcode-select: error: tool ‘genstrings’ requires Xcode, but active developer directory ‘/Library/Developer/CommandLineTools’ is a command line tools instance 解决

 xcode  xcode-select: error: tool ‘genstrings’ requires Xcode, but active developer directory ‘/Library/Developer/CommandLineTools’ is a command line tools instance 解决已关闭评论
9月 092019
 

使用xcode时 在终端使用 genstrings命令时, 却提示: xcode-select: error: tool ‘genstrings’ requires Xcode, but active developer directory ‘/Library/Developer/CommandLineTools’ is a command line tools instance, 可以使用下面的方法解决:

1. 打开xcode, 进入Xcode -> preferences 菜单,或者直接快捷键command + , 进入菜单。
2. 在Locations这个tab下,找到 “Command Line Tools” ,在这个组合框里选择对应的xcode版本即可,我机器选择的是:Xcode 10.2.1(10E1001)

DONE!

升级完macOS mojave后,git命令出现xcrun 错误解决方法

 git, mac  升级完macOS mojave后,git命令出现xcrun 错误解决方法已关闭评论
3月 292019
 

今天升级macOS 到 macOS mojave,升级完后终端里使用git的时候,弹出一行错误:

xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun

解决方法,重装xcode command line:

xcode-select --install

如果没有解决问题,执行以下命令

sudo xcode-select -switch /

DONE!!