ios 每次打开项目时 Xcode 都会意外退出

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

Xcode quits unexpectedly every time I open my project

iosxcodemacos

提问by suvarna

I am just opening my xcode , when i open my current project its showing the warning like "xcode quit unexpectedly " with 3 options "Ignore","Report" and "Reopen",when i click reopen it will open xcode window and again automatically it will close and showing the same warning.

我只是打开我的 xcode ,当我打开我当前的项目时,它显示了“xcode 意外退出”之类的警告,有 3 个选项“忽略”、“报告”和“重新打开”,当我单击重新打开时,它将打开 xcode 窗口并再次自动它将关闭并显示相同的警告。

Why this is happening am not getting am a newbie,if anyone having idea on this plz help me out. if i open any other projects then its opening no issues...issue is with my Current App.

为什么会发生这种情况我不是新手,如果有人对此有想法请帮助我。如果我打开任何其他项目,那么它的打开没有问题...问题出在我当前的应用程序上。

versions :
xcode is 4.3.1
mac OS X version is 10.7.3
Please tell me why its happening like this.

版本:
xcode 是 4.3.1
mac OS X 版本是 10.7.3
请告诉我为什么会这样。

回答by rob mayoff

Xcode stores some user state information inside the Xcode project?“file”, which is really a folder. That state information might have become corrupted. You can normally throw away everything inside your .xcodeprojfolder exceptthe project.pbxprojfile. This might fix your problem.

Xcode 在 Xcode 项目中存储了一些用户状态信息?“文件”,它实际上是一个文件夹。该状态信息可能已损坏。您通常可以扔掉.xcodeproj文件夹中文件之外的所有内容project.pbxproj。这可能会解决您的问题。

Open up the folder containing your .xcodeprojfile. Right-click or control-click the .xcodeprojfile and choose “Show Package Contents”. Then throw away everything except the project.pbxprojfile.

打开包含您的.xcodeproj文件的文件夹。右键单击或按住 Control 键单击.xcodeproj文件,然后选择“显示包内容”。然后扔掉除了project.pbxproj文件之外的所有东西。

cleaning an xcodeproj package

清理 xcodeproj 包

If you know what an Xcode workspace is, and you're actually making use of it, you might not have a project.xcworkspacefile to throw away, or you might not want to throw it away. But if you don't know what an Xcode workspace is, then you're not using it so you can just throw away project.xcworkspace. Xcode will recreate it automatically.

如果您知道 Xcode 工作区是什么,并且您实际上正在使用它,那么您可能没有project.xcworkspace要扔掉的文件,或者您可能不想扔掉它。但是,如果您不知道 Xcode 工作区是什么,那么您就不会使用它,因此您可以将project.xcworkspace. Xcode 会自动重新创建它。

回答by ysnzlcn

Deleting Derived Data worked for me. Just open another project or open xcode without opening your corrupted project. Than open preferences and go locations tab at the end. Click gray circle with arrow (where all your projects derived data are saved.)enter image description here

删除派生数据对我有用。只需打开另一个项目或打开 xcode,而无需打开损坏的项目。最后打开首选项并转到位置选项卡。单击带箭头的灰色圆圈(保存所有项目派生数据的位置。)在此处输入图片说明

Delete your corrupted project's derived data in there and you are good to go.

删除那里损坏的项目的派生数据,您就可以开始了。

回答by Tolga ?skender

you can run XcodeSystemResources.pkg.

你可以运行 XcodeSystemResources.pkg。

/Applications/Xcode.app/Contents/Resources/Packages/XcodeSystemResources.pkg.

I hope help to you

我希望对你有帮助

回答by BonD

Just delete the Xcode saved state. It worked for me.

只需删除 Xcode 保存的状态即可。它对我有用。

回答by simon_smiley

I would recommend opening the terminal and copying in the following:

我建议打开终端并复制以下内容:

rm -rf ~/Library/Developer/Xcode/DerivedData

rm -rf ~/Library/Developer/Xcode/DerivedData

Note:credit to zirinisp for providing the answerthat worked for me

注意:感谢 zirinisp 提供对我有用的答案

回答by sonnet

I am using CocoaPod (XCode 8.2), these steps solved my issue:

我正在使用 CocoaPod (XCode 8.2),这些步骤解决了我的问题:

  1. Go to project folder
  2. Open package contents of .xcworkspace
  3. Delete xcuserdata in package contents
  4. Remove it from Trash (optional)
  5. Go back and open .xcworkspace (XCode will prompt to reopen, but don't do this)
  6. Continue with your project :)
  1. 转到项目文件夹
  2. 打开 .xcworkspace 的包内容
  3. 删除包内容中的 xcuserdata
  4. 从垃圾箱中删除它(可选)
  5. 返回并打开 .xcworkspace (XCode 会提示重新打开,但不要这样做)
  6. 继续你的项目:)

回答by Amit Thakur

go to [ProjectName].xcworkspace file.Right click. Show package contents. Delete xcuserdata folder. After deleting, run the project it will work for sure.

转到 [ProjectName].xcworkspace 文件。右键单击。显示包裹内容。删除 xcuserdata 文件夹。删除后,运行项目,它肯定会工作。

回答by Yogendra Singh

  1. Delete Project.xcworkspace first.
  2. Open Terminal
  3. Go to application folder
  4. Run command pod install
  5. Delete Derived Data
  6. Open Project.xcworkspace
  1. 首先删除 Project.xcworkspace。
  2. 打开终端
  3. 转到应用程序文件夹
  4. 运行命令 pod install
  5. 删除派生数据
  6. 打开 Project.xcworkspace

It works for me.

这个对我有用。

回答by indrit saveta

My Solved that worked

我的解决方案有效

  1. Go to project folder
  2. open package contents of .xcodeproject
  3. Delete xcuserdata in package contents
  4. Go back and delete .xcworkspace
  1. 转到项目文件夹
  2. 打开 .xcodeproject 的包内容
  3. 删除包内容中的 xcuserdata
  4. 返回并删除 .xcworkspace

/// Please dont delete .pbxproj

/// 请不要删除 .pbxproj

Try to open your project and work :)

尝试打开您的项目并工作:)

回答by Ashu

I am using Xcode 8.3

我正在使用Xcode 8.3

Go to ~/Library/Developer/Xcode

~/Library/Developer/Xcode

Delete Derived Data folder and it works for me.

删除派生数据文件夹,它对我有用。

May help you.

可以帮到你。