运行xcode命令报错:

sh-3.2# xcodebuild
xcode-select: error: tool 'xcodebuild' requires Xcode, but active developer directory '/Library/Developer/CommandLineTools' is a command line tools instanc

直接百度错误提示信息找这篇贴子

博主找到的原因是:

升级Xcode后,不是系统默认位置。我想我是直接安装最新版的xcode应该也是这样的问题。

解决的办法是:

修改xcode指向的目录

xcode-select -s /Applications/Xcode.app/Contents/Developer

再次执行xcodebuild就可以正确执行了

1 sh-3.2# xcodebuild
2 note: Using new build system
3 note: Planning build
4 note: Constructing build description
5 Build system information
6 error: Signing for "HelloWorld" requires a development team. Select a development team in the project editor. (in target 'HelloWorld')
7
8 ** BUILD FAILED **

我这边build failed是因为还没有配置开发者账号

by the way 查看xcode安装目录的命令:

这是在未修改xcode命令指向新目录前,是系统默认的位置

sh-3.2# xcode-select --print-path
/Library/Developer/CommandLineTools

这是修改后,再次查看,xcode命令指向xcode的安装目录已经变了

sh-3.2# xcode-select --print-path
/Applications/Xcode.app/Contents/Developer

xcode-select: error: tool 'xcodebuild' requires Xcode, but active developer directory '/Library/Developer/CommandLineTools' is a command line tools instance的更多相关文章

  1. Xcode - xcode-select: error: tool 'xcodebuild' requires Xcode报错解决方案

    用mac 自带的终端执行的命令,安装安装Vapor和toolbox 安装指令: macdeMacBook-Pro:~ mac$ curl -sL check.vapor.sh| bash 结果报这个错 ...

  2. ios 自动化构建 code-select: error: tool 'xcodebuild' requires Xcode, but active developer directory.....

    问题描述: Pod installation complete! There are 2 dependencies from the Podfile and 3 total pods installe ...

  3. stderr: xcode-select: error: tool 'xcodebuild' requires Xcode, but active developer directory '/Library/Developer/CommandLineTools' is a command line tools instance

    错误提示: (1). stderr: xcode-select: error: tool 'xcodebuild' requires Xcode, but active developer direc ...

  4. Mac Angular打包报错xcode-select: error: tool 'xcodebuild' requires Xcode

    Mac Angular打包报错: Error: xcode-select: error: tool 'xcodebuild' requires Xcode, but active developer ...

  5. Mac下idea启动H5报错:xcode-select: error: tool 'xcodebuild' requires Xcode, but active developer directory '/Library/Deve

    1. 执行“ xcodebuild -showsdks ”,报错如下“xcode-select: error: tool 'xcodebuild' requires Xcode, but active ...

  6. iOS自动化构建 xcode-select: error: tool 'xcodebuild' requires Xcode, but active developer directory '/Library/D...

    报这个错误的原因是xcode-select不在默认的路径 1.找到xcode-select的当前路径终端命令行 xcode-select --print-path /Library/Developer ...

  7. tool 'xcodebuild' requires Xcode, but active developer directory '/Library/Developer/CommandLineTools' is a command line tools instance

    在执行自动化打包的时候报错,检查发现是Xcode的路径被改了 标记3的地方原来默认是没有内容的,点击它,然后会自动弹出一个选项,就是xcode的版本. 修改后,在命令行输入xcodebuild命令测试 ...

  8. xcode-select: error: tool 'xcodebuild' requires Xcode, but active developer directory '/Library/Deve

    以上错误是因为安装了 xcode , 但并不是系统默认的位置, 所以可以使用以下命令把 xcode 的路径修改为你安装的位置即可 sudo xcode-select --switch /Applica ...

  9. 关于 ReactNative 环境搭建之 error: invalid developer directory '/Library/Developer/CommandLineTools' - RN

    简要说明,此次尝试安装 ReactNative 时当前 MacPro 版本为 10.13.6.Xcode 版本为 Version 9.4.1 (9F2000),按照官方的完整原生环境搭建流程一步步执行 ...

随机推荐

  1. 查询SQLSERVER执行过的SQL记录(历史查询记录)(转)

    原文链接:https://www.cnblogs.com/icycore/p/10493237.html 有的时候,需要知道近段时间SQLSERVER执行了什么语句,可以用下面的方法: SELECT ...

  2. spring-第十篇之XML Schema的简化配置,p、c、util命名空间

    1.p:命名空间 引入命名空间:xmlns:p="http://www.springframework.org/schema/p" 配置举例: <?xml version=& ...

  3. DP50题(转)

    转自https://www.luogu.org/blog/cccx2016/dp50-ti-ti-hao dp50题: poj1014 poj1015 poj1018 poj1036 poj1038 ...

  4. 21、numpy—Matplotlib

    NumPy Matplotlib Matplotlib 是 Python 的绘图库. 它可与 NumPy 一起使用,提供了一种有效的 MatLab 开源替代方案. 它也可以和图形工具包一起使用,如 P ...

  5. spark连接hive找不到table

    Caused by: org.apache.spark.sql.catalyst.analysis.NoSuchTableException: Table or view 'xxxx' not fou ...

  6. linux上执行jmeter脚本

    1.linux上安装jmeter 将windows上的zip包直接放到linux上 进入bin目录,chmod 777 jmeter 修改环境变量: 1 2 3 4 # vim /etc/profil ...

  7. linux误用rm删除文件后恢复

    linux 系统:ubuntu16.04 误把/usr/local local文件删除了,要疯 步骤: 1.对于文件系统为ext3文件系统 sudo apt-get install ext3grep ...

  8. ES5继承模式

    果然,感觉有些东西不整理一下还是很容易忘记的,很多时候有需要不断地去复习,感觉JavaScript这门语言总体上不能算是特别难,但是知识点特别杂(坑也特别多...),感觉最好还是能够梳理出一个整体架构 ...

  9. 20180209-xml模块

    xml的用法操作如下: xml格式如下: <?xml version="1.0"?> <data> <country name="Liech ...

  10. YouCompleteMe报错可能是第三方库没有

    git submodule update --init --recursive 到YouCompleteMe安装目录下,执行上面的命令