zoukankan      html  css  js  c++  java
  • xcode-select: error: tool 'xcodebuild' requires Xcode, but active developer directory '/Library/Developer/CommandLineTools' is a command line tools instance

    运行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
  • 相关阅读:
    JavaScript 基础知识 4
    JavaScript 基础知识 5 函数
    JavaScript 基础知识 3
    JavaScript 基础知识 2
    JavaScript 基础知识 1
    JavaScript 一
    HTML <a>等元素
    HTML CSS
    HTML <head> 元素
    HTML <meta> 标签
  • 原文地址:https://www.cnblogs.com/kaerxifa/p/11130582.html
Copyright © 2011-2022 走看看