无法确定 CoreData 代码生成的生成文件路径 [英] Could not determine generated file paths for CoreData code generation

查看:31
本文介绍了无法确定 CoreData 代码生成的生成文件路径的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在为不同的目标构建我的项目时,我收到此错误:

While building my project for different target I am getting this error:

无法确定为核心数据代码生成的文件路径一代:错误域=NSCocoaErrorDomain 代码=260没有模型的当前版本在路径/Users/abc/Documents/Code/xyz-ios/ABC/iPhoneXMPP/SRT/Model.xcdatamodeld:"UserInfo={NSFilePath=/Users/abc/Documents/Code/xyz-ios/ABC/iPhoneXMPP/SRT/Model.xcdatamodeld,NSLocalizedDescription=路径中没有模型的当前版本/Users/abc/Documents/Code/xyz-ios/ABC/iPhoneXMPP/SRT/Model.xcdatamodeld:}

Could not determine generated file paths for Core Data code generation: Error Domain=NSCocoaErrorDomain Code=260 "No current version for model at path /Users/abc/Documents/Code/xyz-ios/ABC/iPhoneXMPP/SRT/Model.xcdatamodeld:" UserInfo={NSFilePath=/Users/abc/Documents/Code/xyz-ios/ABC/iPhoneXMPP/SRT/Model.xcdatamodeld, NSLocalizedDescription=No current version for model at path /Users/abc/Documents/Code/xyz-ios/ABC/iPhoneXMPP/SRT/Model.xcdatamodeld:}

错误提到的路径是

/Users/abc/Documents/Code/xyz-ios/ABC/iPhoneXMPP/SRT/Model.xcdatamodeld

/Users/abc/Documents/Code/xyz-ios/ABC/iPhoneXMPP/SRT/Model.xcdatamodeld

"但SRT"文件夹在我的文件夹结构中的Temp"文件夹内.我该如何解决这个问题?

" but "SRT" folder is inside "Temp" folder in my folder structure. How can I resolve this issue?

推荐答案

在我的案例中,这是 Model.xcdatamodeld 在与远程(源或头)合并时发生冲突的结果.不知何故,这个冲突没有被 GIT 检测到,而是作为无冲突的.

In My Case it was a result of Model.xcdatamodeld having conflicts when Merged with Remote (Source or Head). Somehow this conflict wasn't detected by GIT and slid through as Conflict Free.

解决方案:打开 Model.xcdatamodeld 作为 xml(使用 textEditor)并搜索冲突 (>>>).修复冲突并保存.

Resolution: Open Model.xcdatamodeld as xml (with textEditor) and search for conflicts (>>>). Fix conflict and Save.

这篇关于无法确定 CoreData 代码生成的生成文件路径的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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