"NSInternalInconsistencyException', reason: 'This NSPersistentStoreCoordinator has no persistent stores. It cannot perform a save operation.'"

简介:

在做要用到Core Data 相关的项目,突然出现错误

"NSInternalInconsistencyException', reason: 'This NSPersistentStoreCoordinator has no persistent stores.  It cannot perform a save operation.'"

我在程序中已经创建了持久化存储协调器,并使用SQLite数据库做持久化存储。

最好还是在stockover找到答案:

http://stackoverflow.com/questions/1091228/i-keep-on-getting-save-operation-failure-after-any-change-on-my-xcode-data-mod

“If you are only getting this error in the Simulator then you have changed your data model and it hasn't deleted the sqlite file that you were previously using.

So go to: ~/Library/Application Support/iPhone Simulator/User/Applications/

Then look through the HEX-named folders until you see your app. Open the Documents directory and delete the sqlite file. The error should go away.”

可能是你改变coredata的属性项之后再运行的话在模拟器中会出现这个问题。找上面说的,找到mac下的模拟器中的程序路径,然后删掉其sqlite文件再运行就好了!!!

   本文转自老Zhan博客园博客,原文链接:http://www.cnblogs.com/mybkn/archive/2012/09/03/2669412.html,如需转载请自行联系原作者
相关文章
|
5月前
|
JavaScript
Error loading saved preferences: ~/.vuerc may be corrupted or have syntax errors. Please fix/delete
Error loading saved preferences: ~/.vuerc may be corrupted or have syntax errors. Please fix/delete
|
Web App开发 存储 前端开发
Why系列:如无必要, don't 使用delete
啥,你要给我讲啥, delete? 哈哈哈哈哈哈哈哈哈 这里大家可能要笑了,这不就一个操作符吗,还用单独来讲。 有这时间,还不如去看看react源码,vue源码。 我说:react源码会去看的,但是这个也很挺有意思的。
208 0
Why系列:如无必要, don't 使用delete
|
关系型数据库 MySQL 数据安全/隐私保护
Could not obtain connection to query metadata : Public Key Retrieval is not allowed
Could not obtain connection to query metadata : Public Key Retrieval is not allowed
581 0
|
SQL
Remote table-valued function calls are not allowed
在SQL Server中,在链接服务器中调用表值函数(table-valued function)时,会遇到下面错误:   SELECT * FROM LNK_TEST.TEST.DBO.TEST(12)   消息 4122,级别 16,状态 1,第 1 行   Remote table-valued function calls are not allowed.   以前几乎没有在链接服务器(Linked Server)当中调用过表值函数,查了一下资料,看来SQL Server这似乎是不支持的(抑或是不允许)的。
1414 0
|
弹性计算 Serverless
Automated operation of Function Compute
Alibaba Cloud Function Compute is an event-driven and fully-managed compute service. With Function Compute, you can quickly build any type of application.
1784 0
|
消息中间件 Kafka
Batch containing 11 record(s) expired due to timeout while requesting metadata
背景: Kafka集群在一个192.168.0.x网段的,而我们的生产者在192.168.17.x网段的一台机器上,故当生产者发送消息给Kafka时, 无法将消息发送过去。
4387 0
Error saving your changes: Description control characters are not allowed
在修改 GitHub 上的仓库描述时出现此提示信息:Error saving your changes: Description control characters are not allowed 开始以为是 Fork 来的没有修改权限,但之前没有遇到这样的情况,提示信息说的也不是这个意思。
2391 0