Xcode 在特定项目上崩溃
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/40451843/
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
Xcode crashing on a specific project
提问by FS.O6
When I'm trying to open a specific project on Xcode
it's crashing with this error message (part of it):
当我试图打开一个特定的项目时,Xcode
它崩溃了这个错误消息(它的一部分):
Process: Xcode [729]
Path: /Applications/Xcode.app/Contents/MacOS/Xcode
Identifier: com.apple.dt.Xcode
Version: 8.1 (11544)
Build Info: IDEFrameworks-11544000000000000~4
App Item ID: 497799835
App External ID: 819397000
Code Type: X86-64 (Native)
Parent Process: ??? [1]
Responsible: Xcode [729]
User ID: 501
Date/Time: 2016-11-06 18:39:39.261 +0200
OS Version: Mac OS X 10.12.1 (16B2555)
Report Version: 12
Anonymous UUID: E3BEFD49-5451-DC5B-81D3-2BD8B1F4987F
Time Awake Since Boot: 140 seconds
System Integrity Protection: enabled
Crashed Thread: 0 Dispatch queue: com.apple.main-thread
Exception Type: EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Exception Note: EXC_CORPSE_NOTIFY
Application Specific Information:
ProductBuildVersion: 8B62
UNCAUGHT EXCEPTION (NSRangeException): *** -[__NSArrayM objectAtIndex:]: index 5 beyond bounds [0 .. 4]
UserInfo: (null)
Hints:
When I try to open another project everything is fine, it's just this specific project.
当我尝试打开另一个项目时,一切都很好,只是这个特定的项目。
I've tried to restart my Mac and it still crashes.
我试图重新启动我的 Mac,但它仍然崩溃。
Anyone know how to fix this?
有人知道怎么修这个东西吗?
Thanks!
谢谢!
回答by Annie Gupta
Do one thing, clear off/delete all the derived datafor Xcode and then open your project. That should fix the issue.
做一件事,清除/删除Xcode 的所有派生数据,然后打开您的项目。那应该可以解决问题。
Also to report a bug to Apple you can simply go to https://bugreporter.apple.com/and login with apple credentials and and they'd get back to you in like couple of days.
此外,要向 Apple 报告错误,您只需访问https://bugreporter.apple.com/并使用 Apple 凭据登录,他们就会在几天内回复您。
Also for derived data do the following:
You can go to File > Workspace Settings
if you are in a workspace environmentor File > Project Settings
for a regular project environment.
另外派生数据做到以下几点:你可以去File > Workspace Settings
,如果你是在工作区的环境或File > Project Settings
用于经常项目环境。
Then click over the little grey arrow under Derived datasection and select your project folder to delete it.
然后单击派生数据部分下的灰色小箭头并选择您的项目文件夹将其删除。
回答by Krunal Nagvadia
Nothing work for me. I delete my .xcworkspace
and regenerate .xcworkspace
by pod install
and work for me.
没有什么对我有用。我删除我.xcworkspace
和再生.xcworkspace
利用pod install
,并对我来说有效。
回答by Omer
To fix this problem:
要解决此问题:
open a Finder window and navigate to your project right-click on the .xcodeproj file (it's a package actually) select Show Package Contents a new window appears delete a folder called xcuserdata Now open your project again in Xcode and it should work. Your workspace will be reset, bringing a very small amount of happiness and tranquility back into your life.
打开 Finder 窗口并导航到您的项目 右键单击 .xcodeproj 文件(实际上是一个包)选择 Show Package Contents 出现一个新窗口 删除一个名为 xcuserdata 的文件夹 现在再次在 Xcode 中打开您的项目,它应该可以工作了。您的工作空间将被重置,为您的生活带来极少量的快乐和宁静。
回答by rptwsthi
In my case, it was resolved by:
就我而言,它是通过以下方式解决的:
"I was able to get unblocked by deleting project.xcworkspace/xcuserdata in my project"
“我可以通过删除项目中的 project.xcworkspace/xcuserdata 来解除封锁”
Detailed discussion here: https://www.reddit.com/r/iOSProgramming/comments/7zh9wg/xcode_crashes_on_startup/?utm_source=share&utm_medium=web2x
详细讨论在这里:https: //www.reddit.com/r/iOSProgramming/comments/7zh9wg/xcode_crashes_on_startup/?utm_source=share&utm_medium=web2x
回答by Lucas Crostarosa
So I know this is a bit of a dated question but I just spent half my afternoon with the same issue in 9.1.... Basically if you have icloud drive enabled on your computer, you will wreck havok on xcode...not sure why / how but it just does....I moved all of my dev projects out of documents and it now works beautifully. Cheers and good luck
所以我知道这是一个有点过时的问题,但我在 9.1 的同一个问题上花了我半个下午的时间......基本上如果你在你的计算机上启用了 icloud 驱动器,你会破坏 xcode ......不确定为什么/如何,但它只是......我将我所有的开发项目从文档中移出,现在它工作得很好。干杯和好运