Could not attach to pid : “####” unable to attach

2019-01-25 06:42发布

问题:

This question already has an answer here:

  • Failed to Attach to Process ID Xcode 32 answers

I just updated to Xcode 7.3.1 and my project crashes with the same error after the launch screen displays on the iOS simulator.

The error is:

"Could not attach to pid : “1712” unable to attach"

Then I tried running another project and I got:

"Could not attach to pid : “2025” unable to attach"

Any solutions?

回答1:

Kill the simulator, then re-build.



回答2:

Resetting the content and settings in the simulator worked for me. This is available in the "iOS Simulator" menu.



回答3:

In my case Xcode 8.0 after this error,just rebuild again project it solves this problem.

There is no need for reset app content in iPhone device.



回答4:

  1. Close Xcode & simulator
  2. Reopen Xcode & rebuild

Above steps worked for me.



回答5:

  1. I closed Xcode.
  2. On the simulator menu: go to Hardware -> Erase all content and settings.
  3. Open Xcode then build and run the application.

The above simple steps worked for me.



回答6:

Clean the project,quit the simulator and then rebuild the app