错误:更改核心数据模型后,体系结构armv7的符号重复 [英] Error: duplicate symbols for architecture armv7 after change Core Data Model

查看:113
本文介绍了错误:更改核心数据模型后,体系结构armv7的符号重复的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个使用核心数据框架的应用程序.我工作很好.我只是更改了数据模型-将一个属性添加到一个实体. 当我尝试构建它时,出现了一个错误:

I have an app using core data framework. I was working fine. I just changed the data model - add an attribute to one entity. And when I try to build it, I got an error:

duplicate symbol _OBJC_METACLASS_$_AccountFolder in:
/Users/XXX/Library/Developer/Xcode/DerivedData/MyApp-bxsswgxdenxgjweotkkkckaoalat/Build/Intermediates/MyApp.build/Debug-iphoneos/MyApp.build/Objects-normal/armv7/AccountFolder-33D7EA63E98D6090.o

ld: 4 duplicate symbols for architecture armv7
clang: error: linker command failed with exit code 1 (use -v to see invocation)

我进行了一些搜索,大多数人收到此错误,是从.h到.m的错误输入,或者多次导入相同的.h.我检查了我的代码.我没有那个 而且coredata框架仍然存在.

I did some search, and most people getting this error is from mistyping .h to .m, or import same .h several times. I checked my code. I don't have that. And the coredata framework is still there.

有人知道原因可能是什么吗? 谢谢.

Does anyone know what else can be the reason? Thanks.

推荐答案

检查更改后是否生成了多个NSManagedObject子类文件.属性更改后应生成重复的文件.在finder窗口和项目中检入,然后删除重复的文件.那应该可以解决这个问题.

Check if there are multiple NSManagedObject subclass files generated after making this change. There should be duplicate files generated after your attribute change. Check in finder window as well as in project and then remove the duplicate files. That should fix this issue.

这篇关于错误:更改核心数据模型后,体系结构armv7的符号重复的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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