升级到Lion(Xcode4.1)后出现“数据模型版本编译错误” [英] "Data Model Version Compile".. error after upgrading to Lion (Xcode4.1)

查看:152
本文介绍了升级到Lion(Xcode4.1)后出现“数据模型版本编译错误”的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

由于昨天升级到Lion(10.6-> 10.7),我无法编译在升级之前没有编译问题的项目。

Since upgrading to Lion yesterday (10.6->10.7), I've been unable to compile a project that had no problems compiling prior to the upgrade.

甚至没有最近更改导致此错误的项目:如果我从SVN退出项目的一个版本从几天或一个星期前,我得到创建时出现同样的错误:

It's not even a recent change to the project that's causing this error: If I checkout from SVN a version of the project from a few days or a week ago, I get the same error whilst building:

命令/开发人员/ usr / bin / momc失败,退出代码6 ,其扩展如下:

DataModelVersionCompile /Users/ian/Library/Developer/Xcode/DerivedData/inventory-gtvznzuhomhlakbdpocaqwnrihhx/Build/Products/Debug-iphonesimulator/inventory.app/inventory.momd inventory/inventory.xcdatamodeld
cd /Users/ian/AppsDev/uk.co.isurvey-inventory/ios/inventory/trunk/inventory
setenv PATH "/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
/Developer/usr/bin/momc -XD_MOMC_SDKROOT=/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.3.sdk -XD_MOMC_IOS_TARGET_VERSION=4.3 -MOMC_PLATFORMS iphonesimulator -MOMC_PLATFORMS iphoneos -XD_MOMC_TARGET_VERSION=10.6 /Users/ian/AppsDev/uk.co.isurvey-inventory/ios/inventory/trunk/inventory/inventory/inventory.xcdatamodeld /Users/ian/Library/Developer/Xcode/DerivedData/inventory-gtvznzuhomhlakbdpocaqwnrihhx/Build/Products/Debug-iphonesimulator/inventory.app/inventory.momd

2011-07-21 19:24:44.954 momc[4436:a0b] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** -[NSXMLDocument initWithData:options:error:]: nil argument'
*** First throw call stack:
(
0   CoreFoundation                      0x00007fff8e411986 __exceptionPreprocess + 198
1   libobjc.A.dylib                     0x00007fff8d0d5d5e objc_exception_throw + 43
2   CoreFoundation                      0x00007fff8e4117ba +[NSException raise:format:arguments:] + 106
3   CoreFoundation                      0x00007fff8e411744 +[NSException raise:format:] + 116
4   Foundation                          0x00007fff8c761310 -[NSXMLDocument initWithData:options:error:] + 89
5   momc                                0x0000000102f04a2c momc + 10796
6   momc                                0x0000000102f04fe8 momc + 12264
7   momc                                0x0000000102f058f0 momc + 14576
8   momc                                0x0000000102f03d20 momc + 7456
9   ???                                 0x000000000000000a 0x0 + 10
)
terminate called throwing an exception
Command /Developer/usr/bin/momc failed with exit code 6



进一步说明:



AFAIK,唯一的区别是我现在使用狮子版本的Xcode 4.1(在这之前我使用Xcode 4.1为雪豹)。

Further explanation:

AFAIK, the only difference is that I'm using Lion now, and the Lion version of Xcode 4.1 (where I was using Xcode 4.1 for Snow Leopard prior to this).

我已删除/开发人员/,我重新安装了几次,

I've deleted /Developer/ , I've reinstalled several times, and re-downloaded the App Store Xcode installer too, in case it was corrupt.

如果我创建了一个项目使用Xcode(并使用Core Data,我认为这与构建我的项目的任何问题相关),它构建和运行良好:也许有一些我需要做的事来修复我的真正的项目?

If I create a new project using Xcode (and use Core Data, I think that's related to whatever problem there is building my project), it builds and runs fine: maybe there's something I need to do to fix my real project?

任何建议都会辉煌!
Cheers,
Ian

Any suggestions would be brilliant! Cheers, Ian

推荐答案

我有同样的问题,OSX Lion 10.7.1, XCode 4.1。

I've had the same issue, OSX Lion 10.7.1, XCode 4.1.

是的,问题可以通过从* .xcdatamodelid目录中删除所有不显示在XCode中的* .xcdatamodel目录来解决。

Yes, the problem is solved simply by removing all *.xcdatamodel directories that are not displayed in XCode from your *.xcdatamodelid directory. These directories appear after *.xcdatamodel renaming in XCode.

删除可以在终端中进行,也可以在Finder中通过显示包内容菜单来完成。

Removing may be done in Terminal or by Show package contents menu in Finder.

这篇关于升级到Lion(Xcode4.1)后出现“数据模型版本编译错误”的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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