Xcode 错误命令 /Applications/Xcode.app/Contents/Developer/usr/bin/momc 失败,退出代码为 1

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/13245927/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-15 02:01:47  来源:igfitidea点击:

Xcode Error Command /Applications/Xcode.app/Contents/Developer/usr/bin/momc failed with exit code 1

iosxcode

提问by Maxim

DataModelCompile /Users/maxxx/Library/Developer/Xcode/DerivedData/Pectopatop-axonkvxdjwugklfuanzpglrsyquj/Build/Products/Debug-iphoneos/Pectopatop.app/XMPPRoster.mom Pectopatop/../../Libraries/XMPPFramework/Extensions/Roster/CoreDataStorage/XMPPRoster.xcdatamodel cd /Users/maxxx/ios/Pectopatop setenv PATH "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin" /Applications/Xcode.app/Contents/Developer/usr/bin/momc -XD_MOMC_SDKROOT=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.0.sdk -MOMC_PLATFORMS iphonesimulator -MOMC_PLATFORMS iphoneos /Users/maxxx/ios/Pectopatop/Pectopatop/../../Libraries/XMPPFramework/Extensions/Roster/CoreDataStorage/XMPPRoster.xcdatamodel /Users/maxxx/Library/Developer/Xcode/DerivedData/Pectopatop-axonkvxdjwugklfuanzpglrsyquj/Build/Products/Debug-iphoneos/Pectopatop.app/XMPPRoster.mom

DataModelCompile /Users/maxxx/Library/Developer/Xcode/DerivedData/Pectopatop-axonkvxdjwugklfuanzpglrsyquj/Build/Products/Debug-iphoneos/Pectopatop.app/XMPPRoster.mom Pectopatop/../../Libraries/XMPPsStorCoreDataRaster /XMPPRoster.xcdatamodel cd /Users/maxxx/ios/Pectopatop setenv PATH "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/ usr/bin:/usr/bin:/bin:/usr/sbin:/sbin" /Applications/Xcode.app/Contents/Developer/usr/bin/momc -XD_MOMC_SDKROOT=/Applications/Xcode.app/Contents/Developer/平台/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.0.sdk -MOMC_PLATFORMS iphonesimulator -MOMC_PLATFORMS iphoneos /Users/maxxx/ios/Pectopatop/Pectopatop/../../Libraries/XMPPFramework/Extensions/Roster/CorePRosterDataStorage/XMPxcdatamodel /Users/maxxx/Library/Developer/Xcode/DerivedData/Pectopatop-axonkvxdjwugklfuanzpglrsyquj/Build/Products/Debug-iphoneos/Pectopatop.app/XMPPRoster.mom

Command /Applications/Xcode.app/Contents/Developer/usr/bin/momc failed with exit code 1

命令 /Applications/Xcode.app/Contents/Developer/usr/bin/momc 失败,退出代码为 1

What is the problem?

问题是什么?

回答by Lord Zsolt

For future problems, I had this and it was due to the fact that I set the same outlet for two objects.

对于未来的问题,我遇到了这个问题,这是因为我为两个对象设置了相同的出口。

回答by iOSAndroidWindowsMobileAppsDev

My suspicion is that you are still referencing derived data that no longer exists.

我怀疑您仍在引用不再存在的派生数据。

remove all *.xcdatamodel directories that are not displayed in XCode from your *.xcdatamodelid directory. These directories appear after *.xcdatamodel renaming in XCode.

从 *.xcdatamodelid 目录中删除所有未在 XCode 中显示的 *.xcdatamodel 目录。这些目录出现在 XCode 中 *.xcdatamodel 重命名之后。

Removing is done simply in Terminal or by Show package contents menu in Finder.

删除只需在终端中或通过 Finder 中的显示包内容菜单完成。

However, to get a clearer picture you could:

但是,要获得更清晰的图片,您可以:

Go to Build->Build Results or hit shift-command-B. There's an icon on the far right of the error message that looks like a bunch of horizontal lines. Click that or select "all messages".

转到 Build->Build Results 或点击 shift-command-B。错误消息的最右侧有一个图标,看起来像一堆水平线。单击该按钮或选择“所有消息”。

If you still do not understand you could:

如果你还是不明白,你可以:

cd /var/log
cat system.log

回答by Anand Choubey

One more reason could be: Link binary with Libraries might have files which do not exist on the disk.

另一个原因可能是:Link binary with Libraries 可能包含磁盘上不存在的文件。

Regards, Anand Choubey

问候, 阿南德·丘比

回答by kalafun

Ok so basically what I've done to resolve this problem is that I've made a screenshots of my former, not functioning data model, deleted it from project to the trash.. and created it again from the beginning with the same attributes and names that I had before. When I built the app again, no error anymore.

好的,基本上我为解决这个问题所做的工作是我制作了我以前的,不起作用的数据模型的屏幕截图,将它从项目中删除到垃圾箱......并从头开始使用相同的属性重新创建它,并且我以前的名字。当我再次构建应用程序时,不再出错。

hope this helps, I did it within 5 minutes with 2 entities.

希望这会有所帮助,我在 5 分钟内完成了 2 个实体。

回答by UKDataGeek

I had a problem with a corrupted framework that caused this ( PaddleMas 1.18 for me)

我有一个损坏的框架导致这个问题(对我来说是 PaddleMas 1.18)

Try removing each of your frameworks that you are using and seeing if this problem goes away permanently. I was able to make this error go away temporarily by using the clean build folder command ( press alt and go to product menu and select clean build folder)

尝试删除您正在使用的每个框架,看看这个问题是否会永久消失。通过使用 clean build folder 命令(按 alt 并转到产品菜单并选择clean build folder),我能够暂时消除此错误

The permanent fix has been to remove the offending framework but I have seen others with corrupted images also causing this.

永久性修复是删除有问题的框架,但我看到其他图像损坏的框架也导致了这种情况。

Hope this helps!

希望这可以帮助!