运行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. 无法启动Sql Server服务

    本文首发地址为hilsion的博客 今天遇到一个无法启动SQL Server服务的问题,具体报错如下: 根据错误提示,去到WINDOWS的事件查看器.在WIN10上,右击右下角的菜单图标: 然后依次点 ...

  2. MySQL基础(查)

    #新建一个表create database exercise; #查询表的信息SELECT * FROM student;SELECT * FROM score; #查询student表的第二条到第四 ...

  3. CentOS安装ruby, Haskall,io语言

    安装ruby yum install ruby irb rdoc 安装Haskall yum install ghc 安装io语言 安装io语言,需要先安装cmake不过不要使用yum来进行安装,yu ...

  4. [暑假集训Day4T3]曲线

    三分模板. 三分法求单峰函数最优值,之后每次取所有二次函数最优值即可 #pragma GCC optimize(3,"Ofast","inline") #inc ...

  5. Django Rest Framewoek

    1 什么是RESTful REST 指的是一种软件架构风格.设计风格,而不是标准,只是提供了一组设计原则和约束条件.满足这些约束条件和原则的应用程序或设计就是 RESTful. 2 RESTful设计 ...

  6. idea 配置maven web项目

    文章转自:https://www.cnblogs.com/weiqingfeng/p/9494914.html 步骤一:首先先创建一个project,上次我说过了创建一个project就是一个工作空间 ...

  7. JavaScript的变量作用域

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/ ...

  8. 太恐怖了!黑客正在GPON路由器中利用新的零日漏洞

    即使在意识到针对GPONWi-Fi路由器的各种主动网络攻击之后,如果您还没有将其从互联网上带走,那么请小心,因为一个新的僵尸网络已加入GPON组织,该组织正在利用未公开的零日漏洞(零时差攻击). 来自 ...

  9. mysql中的key primary key 和unique key

    mysql 中key就等同于index 所以 key:普通索引 unique key:唯一索引,就是这一列不能重复 primary key:主键索引,就是不能为空,且主键索引不是完全相同时,插入新数据 ...

  10. kd树解平面最近点对

    早上起来头有点疼,突然就想到能不能用kd树解平面最近点对问题,就找了道题试了一下,结果可以,虽然效率不高,但还是AC了~ 题目链接:http://acm.hdu.edu.cn/showproblem. ...