年年有"余"

 找回密码
 立即注册

QQ登录

只需一步,快速开始

查看: 5285|回复: 0

Xcode Attaching to 卡死问题!

[复制链接]
  • TA的每日心情
    倒霉
    2020-11-28 20:31
  • 签到天数: 18 天

    [LV.4]偶尔看看III

    发表于 2014-10-31 09:15:17 | 显示全部楼层 |阅读模式
    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)"

    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- restart xcode and/or restart simulator (reset content and settings) and/or restart computer.

    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- 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- Manually delete the build directory for your project.

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

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

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

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

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

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

    Google翻译如下:
    1. 在Xcode4.2,有时,当你要在模拟器上运行的IOS凸出,状态窗口说:“连接到MyApp的”,只是被卡在那里......直到你取消。现在,这已被问过:XCode的4挂在“连接到(应用程序名称)”
    2. 而奇怪的是,除了该线程上公认的答案,至少有其他10个可能的解决方案,其他人已经加入,都为同一个问题,人们说,其中一人工作,而其他人没有?
    3. 请注意,这不是一系列步骤。每一个是一个可能的解决方案:
    4. 1-重启xcode的和/或重新启动模拟器(重置内容和设置)和/或重新启动计算机。
    5. 2-点击项目导航项目名称。在构建设置选项卡,进入包装,确保“产品名称”是一样的一个Xcode中说,模拟器安装运行时。如果它们是不同的,它会失败。
    6. 3-去你projectname.xcodeproj文件夹。里面有删除任何命名你的用户ID。当你重新打开Xcode的这些文件将被重新创建,它应该工作...
    7. 4-手动删除build目录为您的项目。
    8. 5转到组织者窗口。选择的项目,在左侧选择您的应用程序,然后删除了“导出数据”
    9. 6检查启动选项,在产品展示 - >编辑计划,“运行”计划设置为“自动”。
    10. 7-在Project - >“编辑方案” - >运行。从GDB更改调试器无(这并没有什么意义,我..)。
    11. 8杀死进程GDB-I386-苹果达尔文从活动监视器。这是假设GDB没有响应。
    12. 9-在“产品” - >编辑计划。在运行中,单击yourappname.app,选择其他,浏览到您的项目的。应用程序。现在运行。
    13. 10检查,你不能有两个不同的Info.plist在您的项目。如果你这样做,去掉坏的。
    复制代码
    我解决的方法是这当中的第7条,翻译一下:
    Xcode菜单栏 Product -- Scheme -- Edit Scheme... 打开如下所示页面
    QQ20141031-1@2x.png

    将该选项设置成None就可以了,如果还有问题,把模拟器还原一下,重启下Xcode与模拟器,应该搞定!

    您需要登录后才可以回帖 登录 | 立即注册

    本版积分规则

    手机版|小黑屋|Archiver|iOS开发笔记 ( 湘ICP备14010846号 )

    GMT+8, 2024-12-22 16:49 , Processed in 0.047114 second(s), 21 queries .

    Powered by Discuz! X3.4

    Copyright © 2001-2021, Tencent Cloud.

    快速回复 返回顶部 返回列表