"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,如需转载请自行联系原作者
相关文章
|
Java Maven
An attempt was made to call a method that does not exist. The attempt was made from the following
An attempt was made to call a method that does not exist. The attempt was made from the following
327 0
2015-03-17 current note creation logic in my task
2015-03-17 current note creation logic in my task
102 0
2015-03-17 current note creation logic in my task
Multiple Origin composition test - Opportunity Creation case
Sent: Wednesday, 3 December, 2014 2:48 PM 结论是:如果gateway系统上针对一个odata service维护了多个mark成default的backend system,在creation的case下,runtime时候gateway只会向第一个 Default system发起请求。
Multiple Origin composition test - Opportunity Creation case
2015-03-18 header note creation in my Appointment
2015-03-18 header note creation in my Appointment
88 0
2015-03-18 header note creation in my Appointment
Field creation not permitted in partner development mode
Field creation not permitted in partner development mode
Field creation not permitted in partner development mode
is transfer = C ( only read dynamically) not supported in one order scenario
is transfer = C ( only read dynamically) not supported in one order scenario
113 0
is transfer = C ( only read dynamically) not supported in one order scenario
When should reread of cl_crm_bol_entity and $scope.$apply be called manually
When should reread of cl_crm_bol_entity and $scope.$apply be called manually
139 0
When should reread of cl_crm_bol_entity and $scope.$apply be called manually
automatic asynchronous creation if no note exists
Created by Wang, Jerry, last modified on May 12, 2015
116 0
automatic asynchronous creation if no note exists