How to fix: Xcode cannot be opened because of a problem?

13,541

Solution 1

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.

Solution 2

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.

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.

Solution 3

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?

http://www.iphonedevsdk.com/forum/off-topic/35948-xcode-crash.html

Share:
13,541
memmons
Author by

memmons

Founder of App Apps, LLC. Creator of Audiotorium Notes for iPad & VideoBot.

Updated on November 20, 2022

Comments

  • memmons
    memmons over 1 year

    After installing Xcode 4.0.2, I get this error when I try to launch it by double-clicking on an existing project:

    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

    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.

    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.

    • ThomasW
      ThomasW almost 13 years
      Is it possible that you have more than one copy of Xcode installed?
    • memmons
      memmons almost 13 years
      At one point I did have Xcode3 and 4 side-by-side.
  • memmons
    memmons almost 13 years
    I didn't move it after installing, but I did have multiple versions (3.x and 4.x) installed at the same time at one point, which may have confused the paths. Seems like my only option is to try a complete uninstall.
  • memmons
    memmons almost 13 years
    Updated my question -- I just tried a complete Xcode uninstall and reinstall. Still having the same problem. :-/
  • memmons
    memmons almost 13 years
    It was set to open with Xcode4. Despite that, I manually selected xcode.app and made it the default again. Opening the project now works fine. Very strange.