xcode - 项目“Project-Name”已损坏,由于解析错误而无法打开
问题描述
项目“Project-Name”已损坏,由于解析错误而无法打开。检查项目文件是否存在无效编辑或未解决的源代码管理冲突。
网上其他解决方案描述实际项目文件中存在未解决的冲突:project.pbxproj
但是,这没有任何意义,因为我手动指定了所有传入的更改:
git merge {Branch-Name} --strategy-option theirs
我也尝试过定期合并并在 vim 中手动解决冲突,因为无法使用 Xcode 打开项目。
此外,在 中没有明显的合并冲突,project.pbxproj
因为带有参数的 cmd+f<<<<
>>>>
或====
在整个文件中不会产生任何结果。
此外,这在项目中经常发生,我不确定为什么。也许我的有问题.gitignore
?
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
firebase-debug.log*
# Firebase cache
.firebase/
# Firebase config
# Uncomment this if you'd like others to create their own Firebase project.
# For a team working on the same Firebase project(s), it is recommended to leave
# it commented so all members can deploy to the same project(s) in .firebaserc.
# .firebaserc
# Runtime data
pids
*.pid
*.seed
*.pid.lock
# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov
# Coverage directory used by tools like istanbul
coverage
# nyc test coverage
.nyc_output
# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
.grunt
# Bower dependency directory (https://bower.io/)
bower_components
# node-waf configuration
.lock-wscript
# Compiled binary addons (http://nodejs.org/api/addons.html)
build/Release
# Dependency directories
node_modules/
# Optional npm cache directory
.npm
# Optional eslint cache
.eslintcache
# Optional REPL history
.node_repl_history
# Output of 'npm pack'
*.tgz
# Yarn Integrity file
.yarn-integrity
# Mac OS X
*.DS_Store
# Xcode
*.pbxuser
*.mode1v3
*.mode2v3
*.perspectivev3
*.xcuserstate
Bucket.xcworkspace/
xcuserdata/
# Cocoapodsl
Pods/
解决方案
但是,这没有任何意义,因为我手动指定了所有传入的更改:
git merge {Branch-Name} --strategy-option theirs
这没有任何帮助。您所说的文件是 XML 文件,Git 的合并算法无法正确合并这些文件。-X theirs
or--strategy-option theirs
只是告诉 Git相信它正确地合并了它们,即使它没有。
您必须手动合并这些文件——或者编写一个 XML 合并程序,但这太难了,以至于还没有人做过。或者,根本不合并项目文件:使用您可用的任何项目文件编写器软件编写一个新文件。(在允许合并冲突后,您也可以使用git checkout --theirs
; 直接获取他们的文件,但这可能会丢失您自己一方的重要信息。)
推荐阅读
- amazon-web-services - AWS Elastic Beanstalk 工作人员作业
- terraform - terraform import:如何避免在自动脚本中重新导入时出错
- r - 如何翻转 ggplot2 图表上的趋势线模式?
- python - 使用 Python 的 parsec.py 库进行递归解析
- python - 为什么我的程序加载的屏幕与我需要的屏幕不同?
- arrays - 我怎样才能为两个未排序的数组代码编写这个?
- webforms - 使用面向 .NET Framework 4.6.1 的 Web 表单应用程序对 IdentityServer4 进行基于角色的授权
- javascript - 使用 Nock 记录/回放 http 交互以进行黄瓜 js 测试?
- java - 在Junit中测试子类时设置超类的变量
- mysql - 与另一列的所有元素相关的列中的值