Nativescript无法识别Xcode(High Sierra)

Phi*_*ann 13 xcode nativescript macos-high-sierra

我在High Sierra上使用Xcode版本9.0.1(9A1004).运行时,tns doctor我收到以下警告:

WARNING: Xcode is not installed or is not configured properly.
You will not be able to build your projects for iOS or run them in the iOS Simulator.
To be able to build for iOS and run apps in the native emulator, verify that you have installed Xcode.
Run Code Online (Sandbox Code Playgroud)

如果我运行安装脚本,我得到:

xcode-select: error: tool 'xcodebuild' requires Xcode, but active developer directory '/Library/Developer/CommandLineTools' is a command line tools instance
Xcode is not installed or not configured properly. Download, install, set it up and run this script again.
Run Code Online (Sandbox Code Playgroud)

你可能已经猜到了,我从应用程序商店安装了Xcode,我还安装了cocoapods和xcodeproj.这是我得到的唯一警告.

有什么建议?

小智 32

运行以下命令:

sudo xcode-select --reset
Run Code Online (Sandbox Code Playgroud)

我在这里找到了这个答案:

http://overengineer.net/fixing-nativescript-s-xcode-is-not-installed-or-is-not-configured-properly-on-macos

  • 谢谢DuckDuckGo,让我得到这个答案。 (3认同)