ios 无法附加到 pid:“####”无法附加

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/37582096/
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

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-31 09:14:05  来源:igfitidea点击:

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

iosxcodexcode7xcode7.3

提问by S.Sohi

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.

我刚刚更新到 Xcode 7.3.1,在 iOS 模拟器上显示启动屏幕后,我的项目因相同的错误而崩溃。

The error is:

错误是:

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

“无法附加到pid:“1712”无法附加”

Then I tried running another project and I got:

然后我尝试运行另一个项目,我得到:

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

“无法附加到pid:“2025”无法附加”

Any solutions?

任何解决方案?

回答by Himanshu

Resetting the content and settings in the simulator worked for me. This is available on the iOS Simulator: Hardware -> Erase all Content and Settings

重置模拟器中的内容和设置对我有用。这在 iOS 模拟器上可用:硬件 -> 擦除所有内容和设置

回答by dogsgod

Kill the simulator, then re-build.

杀死模拟器,然后重新构建。

回答by Lehlohonolo_Isaac

  1. I closed Xcode.
  2. On the simulator menu: go to Hardware -> Erase all content and settings. Erase all content and settings
  3. Open Xcode then build and run the application.
  1. 我关闭了Xcode。
  2. 在模拟器菜单上:转到硬件 -> 擦除所有内容和设置。 清除所有内容和设置
  3. 打开 Xcode,然后构建并运行应用程序。

The above simple steps worked for me.

以上简单的步骤对我有用。

回答by Will Gwo

  1. Close Xcode & simulator
  2. Reopen Xcode & rebuild
  1. 关闭 Xcode 和模拟器
  2. 重新打开Xcode并重建

Above steps worked for me.

以上步骤对我有用。

回答by harp

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

在我的情况下,此错误后的 Xcode 8.0,只需重新构建项目即可解决此问题。

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

无需在 iPhone 设备中重置应用程序内容。

回答by Ash

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

清理项目,退出模拟器,然后重新构建应用程序