ios 脂肪错误!!无法打开输入文件

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

Lipo Error!! can't open input file

iosobjective-clipo

提问by Zac24

My application was working perfectly fine, then I started integrating SDK for push notification and stop the integration in between. I even deleted the SDK from my project and trying to archive or run the app, it gives me the error:

我的应用程序运行良好,然后我开始集成用于推送通知的 SDK 并停止两者之间的集成。我什至从我的项目中删除了 SDK 并尝试存档或运行该应用程序,它给了我错误:

lipo Error!! can't open input file.

脂肪错误!!无法打开输入文件。

Any help would be appreciated a lot, I have given enough time to solve this but failed.

任何帮助将不胜感激,我已经给了足够的时间来解决这个问题,但失败了。

/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/lipo: can't open input file: /Users/XYZ/Library/Developer/Xcode/DerivedData/MyAPP-hjbmqpnmsoruqxbwlayqkjsojccv/Build/Intermediates/MyAPP.build/Debug-iphoneos/MyAPP.build/Objects-normal/armv7s/MyAPP (No such file or directory)

/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/lipo:无法打开输入文件:/Users/XYZ/Library/Developer/Xcode/DerivedData/MyAPP-hjbmqpnmsoruqxbwlayqkjsojccv/Build /Intermediates/MyAPP.build/Debug-iphoneos/MyAPP.build/Objects-normal/armv7s/MyAPP(没有那个文件或目录)

回答by Zac24

I got it to work, I just made a simple change in my Project target-> Build setting-> Build Active Architecture only and set this Build Active Architecture only to YES. And it's working fine now..

我让它工作了,我只是在我的项目目标-> 构建设置-> 仅构建活动架构中做了一个简单的更改,并将此构建活动架构设置为 YES。它现在工作正常..

update After 6 months:

6个月后更新:

Again i face this issue after updating to Xcode5. This time i have to update Project target-> Build setting->Valid Architecture to armv7. I removed armv7s and arm64.

更新到 Xcode5 后,我再次面临这个问题。这次我必须将项目目标-> 构建设置-> 有效架构更新为 armv7。我删除了 armv7s 和 arm64。

回答by Avijit Nagare

By Setting "Enable Bitcode" to "No" works for me.

通过将“启用位码”设置为“否”对我有用。

Now i able to Run on Device and submit to App store as well.

现在我可以在设备上运行并提交到 App Store。

enter image description here

在此处输入图片说明

回答by Austin

Note that I got this when switching from Carthage to CocoaPods. Solution was to delete the "Remove Unneeded Architectures" in the Build Phases section.

请注意,我在从 Carthage 切换到 CocoaPods 时得到了这个。解决方案是删除构建阶段部分中的“删除不需要的架构”。

回答by Code Roadie

This happened to me because I'm using cocoapods and the Pods project in the workspace had a different setting for "Build Active Architecture Only" than my main project (YES and NO respectively). When I set both to "NO" I was able to build and run on my device.

这发生在我身上,因为我正在使用 cocoapods 并且工作区中的 Pods 项目与我的主项目具有不同的“仅构建活动架构”设置(分别是 YES 和 NO)。当我将两者都设置为“NO”时,我能够在我的设备上构建和运行。

回答by Eric Shim

Try to remove connected iPad/iPhone if there. This worked for my case.

如果有,请尝试移除已连接的 iPad/iPhone。这适用于我的情况。

回答by nemesis

Try removing file(s) that you've deleted from Project target -> Build Phases -> Compile Sources.

尝试从项目目标 -> 构建阶段 -> 编译源中删除已删除的文件。

Hope that helps.

希望有帮助。

回答by rptwsthi

In my case, I executed my application after some updates, then tried to commit it on git, and conflicts ruined my code. That was sad story.

就我而言,我在一些更新后执行了我的应用程序,然后尝试在 git 上提交它,但冲突破坏了我的代码。那是个悲伤的故事。

But luckily I had one backup on my system and I replaced ruined code with my local code.

但幸运的是我的系统上有一个备份,我用我的本地代码替换了损坏的代码。

Now while executing I felt same problem. Then cleaning the projectwas the magical stick for me. I cleaned the project and I was good to go.

现在在执行时我也遇到了同样的问题。然后清理项目对我来说是神奇的棒。我清理了这个项目,我很高兴去。

回答by Daniel Chepenko

That error occurred, when I've decided to clean up my Derived data folder. I had to call carthage update --platform iOSthen call Cleanin Xcode and build again. Hope that can help someone

当我决定清理派生数据文件夹时,发生了该错误。我不得不调用carthage update --platform iOS然后调用CleanXcode 并再次构建。希望可以帮助某人

回答by djibouti33

This was a cocoapods issue for me. I'm running 0.35.0, Xcode 6.1.1, and apparently I need to mention my targets in my podfile in order for all my cocoapods to work correctly with my targets.

这对我来说是一个 cocoapods 问题。我正在运行 0.35.0,Xcode 6.1.1,显然我需要在我的 podfile 中提及我的目标,以便我的所有 cocoapods 与我的目标一起正常工作。

At the bottom of my podfile, I added:

在我的 podfile 底部,我添加了:

link_with 'Target A', 'Target B' ...

Add all your target names, close Xcode, run pod install, open Xcode, and it should build for you.

添加所有目标名称,关闭 Xcode,运行pod install,打开 Xcode,它应该会为您构建。

Here's the github issue: https://github.com/CocoaPods/CocoaPods/issues/2627

这是 github 问题:https: //github.com/CocoaPods/CocoaPods/issues/2627

回答by puzzl

New potential answer for Swift: we isolated this error down to a single usage of the nil coalescing operator (??) in a category file. The operator is used elsewhere in our project without a problem, but in this specific file, removing it fixed the lipo error.

Swift 的新潜在答案:我们将此错误隔离为在类别文件中单次使用 nil 合并运算符 (??)。该运算符在我们项目的其他地方使用没有问题,但在这个特定文件中,删除它修复了 lipo 错误。