Xcode 9 Bug:找不到cdtool

Jas*_*lin 61 xcode ios xcode8 xcode9

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

在'/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/Library/Xcode/Agents/cdtool'找不到cdtool:找不到平台的模拟器运行时<DVTPlatform:0x7fd67af0a930:'com.apple.platform.iphonesimulator':<DVTFilePath:0x7fd67af0a7c0:'/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform'>>.

我怀疑Xcode 9使用Xcode 8修改了一些共享状态(设置路径,覆盖文件等).但我已经尝试删除和两个Xcodes无济于事.

该项目使用Core Data,在尝试编译xcdatamodel时显然失败了.

我仍然可以在Xcode 9下编译和运行.

Jas*_*lin 186

一位苹果工程师就这个......

那些在Xcode 8中有cdtool错误的人,我怀疑你从Xcode 9安装了iOS 10.3 Simulator运行时.本周发现这导致Xcode 8.3中的cdtool出现问题.

您可以通过将iOS 10.3.simruntime移到一边并重新启动CoreSimulatorService()来解决这个问题:

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

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

sudo killall -9 com.apple.CoreSimulator.CoreSimulatorService 
Run Code Online (Sandbox Code Playgroud)

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

installer -pkg /Applications/Xcode-beta.app/Contents/Resources/Packages/XcodeSystemResources.pkg -target /
Run Code Online (Sandbox Code Playgroud)


Mat*_*t H 5

不适合我,因为我也有一个Watch应用程序,并在Watch SDK上收到错误.

我最终删除了Xcode 8和9 Beta,删除/Library/Developer~/Library/Developer.然后重新安装Xcode 8,它工作.

  • 这是一个糟糕的建议.请不要关注它.您不应该删除/ Library/Developer中的内容,因为这会导致Xcode 9无法启动(并且它不会重新安装内容,因为它希望用户不会删除它). (2认同)