如何解决:由于问题无法打开 Xcode?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/6088840/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
How to fix: Xcode cannot be opened because of a problem?
提问by memmons
After installing Xcode 4.0.2, I get this error when I try to launch it by double-clicking on an existing project:
安装 Xcode 4.0.2 后,当我尝试通过双击现有项目启动它时出现此错误:
Dyld Error Message: Library not loaded: @rpath/DevToolsFoundation.framework/Versions/A/DevToolsFoundation Referenced from: /Developer/Developer/Applications/Xcode.app/Contents/MacOS/Xcode Reason: image not found
Dyld 错误消息:库未加载:@rpath/DevToolsFoundation.framework/Versions/A/DevToolsFoundation 引用自:/Developer/Developer/Applications/Xcode.app/Contents/MacOS/Xcode 原因:找不到图像
Launching Xcode via the dock and opening the project from inside Xcode works fine. Also note that doing a repair install of Xcode did not resolve the issue. I haven't tried completely uninstalling Xcode and installing from scratch, but I would prefer to avoid that as I have my IDE nicely customized the way I like it.
通过 Dock 启动 Xcode 并从 Xcode 内部打开项目工作正常。另请注意,对 Xcode 进行修复安装并没有解决问题。我还没有尝试完全卸载 Xcode 并从头开始安装,但我宁愿避免这种情况,因为我的 IDE 已经按照我喜欢的方式很好地自定义了它。
Update:I just tried a complete uninstall of Xcode via sudo Developer/Library/uninstall-devtools --mode=all
then rebooted and reinstalled. Still having the same issue.
更新:我刚刚尝试完全卸载 Xcode,sudo Developer/Library/uninstall-devtools --mode=all
然后重新启动并重新安装。仍然有同样的问题。
回答by Joshua Nozzi
Before you reinstall, make sure your project file is set to open with the expected copy of Xcode 4. Select it in Finder, press Cmd-I, and make sure the Open With... popup is set to the right copy of Xcode 4.
在重新安装之前,确保您的项目文件设置为使用 Xcode 4 的预期副本打开。在 Finder 中选择它,按 Cmd-I,并确保打开方式...弹出窗口设置为 Xcode 4 的正确副本.
回答by Ander E
It is the ALIAS that is busted, not Xcode. If you reinstalled Xcode, you should make a new alias for your Dock or Desktop or wherever. Delete the old alias as it is no good any more.
被破坏的是 ALIAS,而不是 Xcode。如果你重新安装了 Xcode,你应该为你的 Dock 或 Desktop 或任何地方创建一个新的别名。删除旧别名,因为它不再有用。
Xcode (should) install in /Developer . You can get to that by going to your hard drive named something like "Macintosh HD". Make a new alias from there.
Xcode(应该)安装在 /Developer 中。您可以通过转到名为“Macintosh HD”之类的硬盘驱动器来实现。从那里创建一个新别名。
回答by ThomasW
According to the discussion below, the problem is that it is not in the /Developer/Applications/ folder. However, I think that is just a clue to the source of the problem, because Xcode is supposed to work in multiple locations. It is possible that Xcode sets fixed paths when installed and can't be moved. Did you happen to move it after installing?
根据下面的讨论,问题在于它不在 /Developer/Applications/ 文件夹中。但是,我认为这只是问题根源的一个线索,因为 Xcode 应该在多个位置工作。有可能Xcode在安装时设置了固定路径,无法移动。你安装后碰巧移动了它吗?
http://www.iphonedevsdk.com/forum/off-topic/35948-xcode-crash.html
http://www.iphonedevsdk.com/forum/off-topic/35948-xcode-crash.html