在terminal上运行React Native App时出错(iOS)
我正在关注官方React Native网站上的教程。
使用以下来build立我的项目:
react-native run-ios 我得到的错误:
 Found Xcode project TestProject.xcodeproj xcrun: error: unable to find utility "instruments", not a developer tool or in PATH Command failed: xcrun instruments -s xcrun: error: unable to find utility "instruments", not a developer tool or in PATH 
虽然,当我从.xcodeproj运行应用程序,一切工作正常。
有什么build议么?
 看看这个链接: https : //github.com/facebook/react-native/issues/7965 。 这似乎是Command line tools的位置的问题。 
在Xcode中,selectXcode菜单,然后selectPreferences,然后selectLocations标签。 从下拉列表中select您的Xcode版本并退出Xcode。
  
 
通过命令行
如果您已经下载了Xcode,您可以运行以下命令来设置path:
 sudo xcode-select -s /Applications/Xcode.app 
如果命令行工具尚未安装,则可能需要先运行它:
 xcode-select --install 
通过Xcode
 或者通过Xcode进行调整( Xcode > Preferences > Locations ): 
  
 
 在我第一次安装之前,我必须接受XCode许可证,才能运行它。 您可以运行以下命令通过命令行获取许可证提示。 你必须inputagree并确认。 
 sudo xcodebuild -license 
在我的情况下,问题是Xcode没有安装。