Xcode 无法在模拟器中运行应用程序

Xcode 无法在模拟器中运行应用程序,xcode,macos,ios8,ios-simulator,osx-yosemite,Xcode,Macos,Ios8,Ios Simulator,Osx Yosemite,我已从另一台mac复制Xcode并粘贴到应用程序文件夹中,但在尝试运行我的应用程序时出现此错误: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk/usr/lib/dyld_sim is not owned by root 但是,我通过在终端中编写以下代码解决了此错误: sudo xcode-select -switch

我已从另一台mac复制Xcode并粘贴到应用程序文件夹中,但在尝试运行我的应用程序时出现此错误:

/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk/usr/lib/dyld_sim is not owned by root
但是,我通过在终端中编写以下代码解决了此错误:

sudo xcode-select -switch /Applications/Xcode.app/Contents/Developer
sudo chown root /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk/usr/lib/dyld_sim
但由于上面的代码,我遇到了另一个与模拟器相关的错误:

运行时遇到错误 (Domain=com.apple.CoreSimulator.SimError,Code=146)


非常感谢您的帮助。

您尚未正确安装Xcode。

请在应用程序文件夹中复制您的Xcode,然后在终端上尝试以下操作:

sudo xcode-select -switch /Applications/Xcode.app/Contents/Developer
sudo chown root /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk/usr/lib/dyld_sim

我从另一台mac电脑上复制,然后粘贴there@warzone_fz这不是它的安装方式。当苹果的傻瓜安装程序决定在错误的地方安装XCode时,就像在非系统磁盘上的XCode5上,而不是在当前应用程序文件夹中一样?仅复制和粘贴不会安装xocde正确运行所需的所有材料