xcode-select: error: tool 'xcodebuild' requires Xcode, but active developer directory '/Library/Developer/CommandLineTools' is a command line tools instance
2024-09-05 15:29:08
运行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
最新文章
- 在Windows Server 2008中布置Web站点时遇到的问题及解决办法
- HTML5服务器推送消息的各种解决办法
- Leetcode 264. Ugly Number II
- fastboot 教程
- android开发系列之MVP设计模式
- 【转载】Powershell设置世纪互联Office365嵌套组发送权限
- centos 6.4 安装php-fpm 及常用扩展,(转)
- 发送email给列表中的邮箱--python
- 理解C#中的继承
- 移植MonkeyRunner的图片对比和获取子图功能的实现-UiAutomator/Robotium篇
- 【java】文件操作java.io.File
- Python笔记十一(迭代器)
- DVWA 黑客攻防演练(二)暴力破解 Brute Froce
- python--数据类型bytes
- 3_主流部署方式介绍-Django+mod_wsgi+Apache
- PHP删除数组中空值的方法
- QT-QWebEngineView-createWindow弹出页面解决
- 小技巧-mac修改finder菜单栏
- browse-agent type and curl post
- c#asp.net url 传递中文参数要使用 System.Web.HttpUtility.UrlEncode 而不能使用Server.UrlEncode
热门文章
- php用什么软件编程
- Neo4j elk Elasticsearch kibana kettle
- POJ-1611.TheSuspects.(并查集)
- jvm性能监控(2)–JVM的监控工具jstat
- Spring cloud 注册服务小结
- Centos7.6替换自带的jre安装jdk
- java 日期工具
- JavaScript代码内部执行顺序
- NGUI的拖拽和放下功能的制作,简易背包系统功能(drag and drop item)
- javascript中的toString()、toLocaleString()方法