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

2019-01-10 22:03发布

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

error: failed to attach to process ID 0

I tried to clean & build again and it still doesn't work out. I googled but couldn't find anything helpful. How can I fix this problem? Thank You!

20条回答
SAY GOODBYE
2楼-- · 2019-01-10 22:23

Have you tried closing down the simulator entirely, or failing that, reset the simulator and all its contents usually does the trick.

查看更多
再贱就再见
3楼-- · 2019-01-10 22:24

I fixed my problem by I making a new blank project and importing all the old files.

It must have been a problem with Xcode because it worked before iOS 5.1.

查看更多
Bombasti
4楼-- · 2019-01-10 22:26

I had the same problem, in my case i have left the ios simulator open in one user account and switched (without logout the previous one) to another user account. I couldn't event able to open ios simulator to clear and reset its settings. [Shows could no open ios simulator OSStatus - 10829]

My solution: I quit the simulator in the first user account and then came back to second user account, every thing is working fine.

查看更多
爷的心禁止访问
5楼-- · 2019-01-10 22:28

If you are using a network account, you should replace the "~/Library/Application Support/iPhone Simulator" with a link to a local directory. This worked for me after trying everything else.

查看更多
祖国的老花朵
6楼-- · 2019-01-10 22:30

This happened to me when I had two xcode projects open with the same bundle identifier.

Solution: leave only one project open which has the same bundle id.

查看更多
别忘想泡老子
7楼-- · 2019-01-10 22:30

What worked for me was to select 'Delete Derived Data' from the Projects tab in the organiser.

查看更多
登录 后发表回答