xcode 命令 /usr/bin/lipo 失败,退出代码 1 错误

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/9189259/
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-14 23:15:34  来源:igfitidea点击:

Command /usr/bin/lipo failed with exit code 1 error

objective-ciosxcode

提问by Teddy13

I have finally finished my app and I was getting ready to upload when this sudden error hit me and I have no idea what to do. I have checked other posts saying to change the code signing identity and I have done this but no luck. I tried every single option in the identity and no change. If anyone knows what is going on I would really appreciate it since I would simply just like to submit my app.

我终于完成了我的应用程序,我正准备上传这个突然的错误时,我不知道该怎么办。我检查了其他帖子说要更改代码签名身份,我已经这样做了,但没有运气。我尝试了身份中的每一个选项,但没有任何变化。如果有人知道发生了什么,我将非常感激,因为我只想提交我的应用程序。

Here is what else it says in the erorr log:

这是它在错误日志中的其他内容:

/usr/bin/lipo: /Users/teddy/Library/Developer/Xcode/DerivedData/grocery_stores-dcyubhefhrcjhtcxbhldfpukdgdz/Build/Intermediates/grocery stores.build/Release-iphoneos/grocerystores.build/Objects-normal/armv7/grocery stores and /Users/teddy/Library/Developer/Xcode/DerivedData/grocery_stores-dcyubhefhrcjhtcxbhldfpukdgdz/Build/Intermediates/grocery stores.build/Release-iphoneos/grocery stores.build/Objects-normal/armv7/grocery stores have the same architectures (armv7) and can't be in the same fat output file

Command /usr/bin/lipo failed with exit code 1

回答by haifacarina

I solved this issue by changing the value of the Valid Architecture found in Project > Build Settings > Architectures from the default "armv6 armv7" to "armv7". Hope this helps.

我通过将 Project > Build Settings > Architectures 中的 Valid Architecture 的值从默认的“armv6 armv7”更改为“armv7”解决了这个问题。希望这可以帮助。

回答by rooftop

It's hard to see what exactly is happening without the command you are running. It looks to me like you are specifying the same input file twice, namely the arm7 version and lipo is telling you you can't add 2 arm7 versions of grocery stores to the universal file. Can you please enter the entire lipo command you are running? From the lipo man page: -create Take the input files (or file) and create one universal output file from them. Do you possibly have the same file listed twice here?

如果没有您正在运行的命令,很难看到到底发生了什么。在我看来,您指定了两次相同的输入文件,即 arm7 版本,而 lipo 告诉您不能将 2 个 arm7 版本的杂货店添加到通用文件中。你能输入你正在运行的整个 lipo 命令吗?从 lipo 手册页: -create 获取输入文件(或文件)并从中创建一个通用输出文件。您是否可能在此处列出了两次相同的文件?

回答by Muhammad Saad Ansari

Try changing your build target to a simulator build, clean and re-run.

尝试将构建目标更改为模拟器构建,清理并重新运行。

回答by Nikolay Shubenkov

In my case I used pods and oped projectFile instead of project workspace

在我的例子中,我使用了 pods 和 oped projectFile 而不是项目工作区

回答by gorgi93

In my case it was building a project on simulator in a release scheme, changed it to debug and it worked.

在我的情况下,它正在以发布方案在模拟器上构建一个项目,将其更改为调试并且它起作用了。