运行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

最新文章

  1. 在Windows Server 2008中布置Web站点时遇到的问题及解决办法
  2. HTML5服务器推送消息的各种解决办法
  3. Leetcode 264. Ugly Number II
  4. fastboot 教程
  5. android开发系列之MVP设计模式
  6. 【转载】Powershell设置世纪互联Office365嵌套组发送权限
  7. centos 6.4 安装php-fpm 及常用扩展,(转)
  8. 发送email给列表中的邮箱--python
  9. 理解C#中的继承
  10. 移植MonkeyRunner的图片对比和获取子图功能的实现-UiAutomator/Robotium篇
  11. 【java】文件操作java.io.File
  12. Python笔记十一(迭代器)
  13. DVWA 黑客攻防演练(二)暴力破解 Brute Froce
  14. python--数据类型bytes
  15. 3_主流部署方式介绍-Django+mod_wsgi+Apache
  16. PHP删除数组中空值的方法
  17. QT-QWebEngineView-createWindow弹出页面解决
  18. 小技巧-mac修改finder菜单栏
  19. browse-agent type and curl post
  20. c#asp.net url 传递中文参数要使用 System.Web.HttpUtility.UrlEncode 而不能使用Server.UrlEncode

热门文章

  1. php用什么软件编程
  2. Neo4j elk Elasticsearch kibana kettle
  3. POJ-1611.TheSuspects.(并查集)
  4. jvm性能监控(2)–JVM的监控工具jstat
  5. Spring cloud 注册服务小结
  6. Centos7.6替换自带的jre安装jdk
  7. java 日期工具
  8. JavaScript代码内部执行顺序
  9. NGUI的拖拽和放下功能的制作,简易背包系统功能(drag and drop item)
  10. javascript中的toString()、toLocaleString()方法