Xcode compiles my App, but can't run it in the simulator

后端 未结 20 1327
一向
一向 2020-12-05 01:59

when i compile my app, Xcode just says \"Attaching to Projectname...\" and gets stuck there. The debugger just prints this out:

error: failed to attac

20条回答
  •  悲哀的现实
    2020-12-05 02:26

    I had similar issues when i installed XCode 4.5 on OS X Mountain Lion. I searched a while and tried some fixes but what finally solved the problem was adding "127.0.0.1 localhost" to my hosts file (/etc/hosts).

    Here is what i have done:

    Open a terminal shell with cmd+space > terminal
    type in "cd /etc"
    type in "sudo nano hosts"
    type in your root password
    add "127.0.0.1 localhost"
    save with ctrl+o > return
    close with ctrl+x
    log out and log in again or restart
    

提交回复
热议问题