Xcode 4.2。被卡住了“附加到myapp”跑步的时候 [英] Xcode 4.2. gets stuck "Attaching to myapp" when running

查看:140
本文介绍了Xcode 4.2。被卡住了“附加到myapp”跑步的时候的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在xcode 4.2中,有时当你要在模拟器上运行你的ios项目时,状态窗口显示附加到myapp,然后卡在那里......直到你取消。
现在,之前已经问过:
XCode 4挂起在附加到(应用程序名称)

In xcode 4.2, sometimes when you're going to run your ios proj on simulator, the status windows says "Attaching to myapp", and just gets stuck there... until you cancel. Now, this has been asked before: XCode 4 hangs at "Attaching to (app name)"

并且令人惊讶的是,除了该线程上接受的答案外,还有至少10个其他其他人一直在增加可能的解决方案,所有问题都在同一个问题上,人们说其中一个工作而其他人没有...

and surprisingly, besides the accepted answer on that thread, there are at least 10 other possible solutions others have been adding, all for the same issue, people says one of them worked while the others didn't...

请注意,这不是一系列步骤。每个都是一个可能的解决方案:

please note, this is not a sequence of steps. each one is a possible solution:

1 - 重新启动xcode和/或重启模拟器(重置内容和设置)和/或重新启动计算机。

1- restart xcode and/or restart simulator (reset content and settings) and/or restart computer.

2 - 点击项目导航器中的项目名称。在构建设置选项卡中,转到打包并确保产品名称与运行时模拟器附加的xcode相同。如果它们不同,它将失败。

2- click on project name in project navigator. in build settings tab, go to packaging and make sure that "Product Name" is the same that the one xcode says simulator is attaching to when running. if they are different, it will fail.

3 - 转到projectname.xcodeproj文件夹。在里面删除用你的userid命名的任何内容。当你重新打开xcode时,这些文件将被重新创建并且它应该可以工作...

3- go to your projectname.xcodeproj folder. inside there delete anything named with your userid. when you reopen xcode those files will be recreated and it should work…

4 - 手动删除项目的构建目录。

4- Manually delete the build directory for your project.

5 - 转到管理器窗口。选择项目,在左侧选择您的应用,然后删除派生数据

5- Go to organizer window. select Projects, select your app in the left hand side and then delete over "Derived Data"

6 - 检查启动选项设置为自动在产品 - >编辑方案中,运行方案。

6- Check Launch option is set to "Automatically" in Product->Edit Scheme, "Run" scheme.

7 - 在项目中 - >编辑方案 - >运行。将调试器从GDB更改为无(这对我来说没有意义..)。

7- In Project->"Edit Schemes"->Run. Change the Debugger from GDB to None (this doesn't make sense to me..).

8 - 杀死进程gdb-i386来自Activity Monitor的-apple-darwin。这是假设gdb没有响应。

8- Kill the process gdb-i386-apple-darwin from Activity Monitor. this is assuming gdb is not responding.

9 - 在产品 - >编辑方案中。在运行中,单击yourappname.app,选择其他,导航到项目中的.app。现在运行。

9- In "Product"->Edit Scheme. in Run, click yourappname.app, choose other, navigate to your .app in your project. now run.

10 - 检查项目中是否有两个不同的Info.plist。如果你这样做,删除坏的。

10- Check that you don't have two different Info.plist in your project. if you do, remove the bad one.

在我的情况下,他们都没有完成这项工作。我的项目成功构建,一切似乎都很好,.plist,包标识符,名称等等。仍然无法通过附加部分。我不明白这个的原因,所以任何修复它的建议并且可能理解这个问题我会非常感激。

In my case, none of them do the job. My project builds succesfully, everything seems fine, .plist, bundle identifier, name, etc.. and still can't pass the "attaching" part. i don't understand the reason of this, so any suggestions to fix it and possibly understand the problem i'll really appreciate it.

推荐答案

新项目未能在模拟器中启动,卡在连接步骤上。

New projects were failing to launch in the simulator, getting stuck on the attach step.

这似乎是在安装Xcode 4.3之后,但我不能回想一下我创建的最后一个新项目。

This seems to be after Xcode 4.3 was installed, but I can't recall the last new project I created.

这对我有用,来自这个线程的线索......

This is what worked for me, the clue coming from this thread...

项目 - >编辑方案 - >运行。将调试器从LLDB更改为GDB

Project->"Edit Schemes"->Run. Change the Debugger from LLDB to GDB

具有相同Xcode版本的另一台计算机工作正常。也许我的LLDB已经腐败了?

Another computer with the same version of Xcode works fine. Maybe my LLDB is corrupt?

这篇关于Xcode 4.2。被卡住了“附加到myapp”跑步的时候的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆