error: Cannot find cdtool at 安装Xcode 9后,Xcode 8在编译项目时会出现错误

安装Xcode 9后,Xcode 8在编译项目时会出现错误:

error: Cannot find cdtool at '/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/Library/Xcode/Agents/cdtool': Cannot find a simulator runtime for platform <DVTPlatform:0x7fa25a60fc20:'com.apple.platform.iphonesimulator'<DVTFilePath:0x7fa25a60fab0:'/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform'>>

移动iOS 10.3.simruntime可以解决这个问题,

sudo mkdir/Library/Developer/CoreSimulator/Profiles/Runtimes/Backup

sudo mv/Library/Developer/CoreSimulator/Profiles/Runtimes/{,Backup/}iOS\10.3.simruntime

sudo killall-9com.apple.CoreSimulator.CoreSimulatorService

然后重新启动Xcode,Simulator等;那些删除了CoreSimulator.framework,因此无法再运行Xcode.app,可以重新安装CoreSimulator.framework

installer-pkg/Applications/Xcode-beta.app/Contents/Resources/Packages/XcodeSystemResources.pkg-target/

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容