M1 MacBook 终端报错解决记录:Class is implemented in both (...)

本文讨论了在使用Xcode过程中遇到的两个常见问题,包括Classisimplementedinboth错误和xcode-select错误,提供了解决方案,如安装最新稳定版本及针对不同情况选择正确的Xcode路径。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

提示一:
Class is implemented in both (...)解决:
sudo xcode-select -r

xcode-select --install” and then “xcode-select -s /Library/Developer/CommandLineTools

参考:
https://developer.apple.com/forums/thread/698628
https://developer.apple.com/forums/thread/47579

更新:20223年7月19日:

xcode beta4 系统引入的bug,待升级正式版本后看是否修复

This appears to be a bug introduced by Apple in the latest beta release of their tooling (this has been reproduced on local machines). So far, it seems this does not cause any negative impact other than excessive noise in build outputs, so can be safely ignored.

参考:https://discuss.circleci.com/t/xcode-15-beta-4-released/48645

提示二:

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

解决:

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

参考:
https://github.com/nodejs/node-gyp/issues/569

备注:解决提示一后,出现提示二,暂未解决,待后续更新

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值