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

时间:2022-01-19 00:58:09

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)

/应用程序/ xcode /内容/开发/平台/ iPhoneOS。平台/开发者/usr/bin/lipo:不能打开输入文件:/用户/XYZ/库/开发者/Xcode/DerivedData/MyAPP- hjbmqpnmsoruqxbwlayqpnmsoruqpnmsoruqpnmsoruqpnmsoruqpnmsoruqpnmsoruqpnmsoruqpnmsoruqpnmsoruqpnmsoruqpnmsoruqpnmsoruqpnmsoruqpnmsoruqpnmsoruqpnmsoruqpnmsoruqpnmsoruqpnmsoru构建/Objects-normal/armv7s/MyAPP(无此文件或目录)

18 个解决方案

#1


66  

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。

#2


10  

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。

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

#3


5  

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)的“构建活动架构”的设置不同。当我设置“不”时,我可以在我的设备上构建和运行。

#4


5  

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时得到了这个。解决方案是在构建阶段部分删除“删除不需要的体系结构”。

#5


4  

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

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

Hope that helps.

希望有帮助。

#6


3  

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

如果有的话,试着删除连接的iPad/iPhone。这对我来说很有效。

#7


1  

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 project was the magical stick for me. I cleaned the project and I was good to go.

在执行过程中,我遇到了同样的问题。然后清洁这个项目是我的魔法棒。我打扫了这个项目,我很高兴去。

#8


1  

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.

这对我来说是一个难题。我运行的是0.35.0,Xcode 6.1.1,显然我需要在我的播客中提到我的目标,以便我所有的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安装,打开Xcode,它应该为您构建。

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

这里是github的问题:https://github.com/cocoapods/es/2627。

#9


1  

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

当我决定清理我的派生数据文件夹时,出现了错误。我必须调用carthage update——平台iOS,然后在Xcode中调用Clean,然后重新构建。希望能帮助别人。

#10


0  

For me, this occurred because my main executable and a library I was statically linking with had different settings in Build Settings > Architectures. The library was set to only "Standard architectures" but the main exe was set to "Standard architectures (including 64-bit)."

对我来说,这是因为我的主要可执行文件和一个我静态链接的库在构建设置>架构中有不同的设置。该库只设置为“标准体系结构”,但主要的exe被设置为“标准体系结构(包括64位)”。

I think what was happening was that when the build process went to link everything, it found it was missing the 64-bit versions of the libraries, causing this error.

我认为正在发生的事情是,当构建过程连接到所有东西时,它发现它丢失了64位版本的库,导致了这个错误。

Setting them all to the same value (either with or without 64-bit) resolved the issue for me.

将它们设置为相同的值(无论是否使用64位)都解决了这个问题。

#11


0  

I get this error when disconnect device from my Mac, press my project on my project name (near play/stop build button in upper left corner), select device -> [iOS Device] and press product -> build Also I want to mention that project has a lot of 3rd party libs and some libraries installed with pods.

我得到这个错误当断开设备与我的Mac,按我的项目在我的项目名称(靠近播放/停止建立按钮在左上角),选择设备- >(iOS设备)和按产品- >构建也我想提到项目有很多第三方库和一些图书馆安装的吊舱。

#12


0  

I had this error after a rebase put a bunch of inaccessible directories (over and over) in my framework search paths. Someone did not import the frameworks they were working on until the very end, and left references to their own directory in the code. Solved by comparing branches and removing offending code from the pbxproj

在我的框架搜索路径中放置了一堆不可访问的目录(一遍又一遍)之后,我有了这个错误。有些人没有导入他们一直工作到最后的框架,并且在代码中留下了对他们自己的目录的引用。通过比较分支和删除pbxproj中的违规代码来解决。

#13


0  

None of that worked for me.

这些对我都不起作用。

After a bit of digging (git reset, etc.) I found that my workspace was corrupted. I deleted the content of the project.xcworkspace and all went back to normal.

经过一点挖掘(git重置等),我发现我的工作空间被破坏了。我删除了项目的内容。xcworkspace恢复正常。

Reason why even reset didn't work is because the .xcworskpace is in my .gitignore (like many I guess).

因为。xcworskpace在我的。gitignore(和许多我想的一样)。

#14


0  

In my case, the problem occurred because I had an object (AVAudioPlayer) instance variable declared with the same name in two controllers - the app delegate and one other controller. Strange, but the problem disappeared when I renamed one of them.

在我的例子中,出现了问题,因为我有一个对象(AVAudioPlayer)实例变量,在两个控制器中声明了相同的名称——应用委托和另一个控制器。奇怪的是,当我重新命名其中一个时,问题就消失了。

#15


0  

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错误。

#16


0  

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

you must have to add .m files in Compile Sources of Bundle Target.

您必须在Bundle Target的编译源中添加.m文件。

#17


0  

I updated one framework in my project but somehow missed committing/pushing its one file 'info.plist'(because of some problem in my gitignore file). Since then everybody else started getting this error. So just committing the missed info.plist file fixed the problem. Hope this helps someone.

我在我的项目中更新了一个框架,但是不知怎么的,我错过了提交一个文件的信息。plist(因为我的gitignore文件中有一些问题)。从那时起,所有人都开始犯这个错误。所以只提交遗漏的信息。plist文件解决了这个问题。希望这可以帮助别人。

#18


0  

i tried to re-select provisioning profile signing for both debug and release. this did fix the issue.

我尝试重新选择调试和发布的配置文件。这确实解决了问题。

#1


66  

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。

#2


10  

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。

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

#3


5  

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)的“构建活动架构”的设置不同。当我设置“不”时,我可以在我的设备上构建和运行。

#4


5  

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时得到了这个。解决方案是在构建阶段部分删除“删除不需要的体系结构”。

#5


4  

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

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

Hope that helps.

希望有帮助。

#6


3  

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

如果有的话,试着删除连接的iPad/iPhone。这对我来说很有效。

#7


1  

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 project was the magical stick for me. I cleaned the project and I was good to go.

在执行过程中,我遇到了同样的问题。然后清洁这个项目是我的魔法棒。我打扫了这个项目,我很高兴去。

#8


1  

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.

这对我来说是一个难题。我运行的是0.35.0,Xcode 6.1.1,显然我需要在我的播客中提到我的目标,以便我所有的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安装,打开Xcode,它应该为您构建。

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

这里是github的问题:https://github.com/cocoapods/es/2627。

#9


1  

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

当我决定清理我的派生数据文件夹时,出现了错误。我必须调用carthage update——平台iOS,然后在Xcode中调用Clean,然后重新构建。希望能帮助别人。

#10


0  

For me, this occurred because my main executable and a library I was statically linking with had different settings in Build Settings > Architectures. The library was set to only "Standard architectures" but the main exe was set to "Standard architectures (including 64-bit)."

对我来说,这是因为我的主要可执行文件和一个我静态链接的库在构建设置>架构中有不同的设置。该库只设置为“标准体系结构”,但主要的exe被设置为“标准体系结构(包括64位)”。

I think what was happening was that when the build process went to link everything, it found it was missing the 64-bit versions of the libraries, causing this error.

我认为正在发生的事情是,当构建过程连接到所有东西时,它发现它丢失了64位版本的库,导致了这个错误。

Setting them all to the same value (either with or without 64-bit) resolved the issue for me.

将它们设置为相同的值(无论是否使用64位)都解决了这个问题。

#11


0  

I get this error when disconnect device from my Mac, press my project on my project name (near play/stop build button in upper left corner), select device -> [iOS Device] and press product -> build Also I want to mention that project has a lot of 3rd party libs and some libraries installed with pods.

我得到这个错误当断开设备与我的Mac,按我的项目在我的项目名称(靠近播放/停止建立按钮在左上角),选择设备- >(iOS设备)和按产品- >构建也我想提到项目有很多第三方库和一些图书馆安装的吊舱。

#12


0  

I had this error after a rebase put a bunch of inaccessible directories (over and over) in my framework search paths. Someone did not import the frameworks they were working on until the very end, and left references to their own directory in the code. Solved by comparing branches and removing offending code from the pbxproj

在我的框架搜索路径中放置了一堆不可访问的目录(一遍又一遍)之后,我有了这个错误。有些人没有导入他们一直工作到最后的框架,并且在代码中留下了对他们自己的目录的引用。通过比较分支和删除pbxproj中的违规代码来解决。

#13


0  

None of that worked for me.

这些对我都不起作用。

After a bit of digging (git reset, etc.) I found that my workspace was corrupted. I deleted the content of the project.xcworkspace and all went back to normal.

经过一点挖掘(git重置等),我发现我的工作空间被破坏了。我删除了项目的内容。xcworkspace恢复正常。

Reason why even reset didn't work is because the .xcworskpace is in my .gitignore (like many I guess).

因为。xcworskpace在我的。gitignore(和许多我想的一样)。

#14


0  

In my case, the problem occurred because I had an object (AVAudioPlayer) instance variable declared with the same name in two controllers - the app delegate and one other controller. Strange, but the problem disappeared when I renamed one of them.

在我的例子中,出现了问题,因为我有一个对象(AVAudioPlayer)实例变量,在两个控制器中声明了相同的名称——应用委托和另一个控制器。奇怪的是,当我重新命名其中一个时,问题就消失了。

#15


0  

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错误。

#16


0  

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

you must have to add .m files in Compile Sources of Bundle Target.

您必须在Bundle Target的编译源中添加.m文件。

#17


0  

I updated one framework in my project but somehow missed committing/pushing its one file 'info.plist'(because of some problem in my gitignore file). Since then everybody else started getting this error. So just committing the missed info.plist file fixed the problem. Hope this helps someone.

我在我的项目中更新了一个框架,但是不知怎么的,我错过了提交一个文件的信息。plist(因为我的gitignore文件中有一些问题)。从那时起,所有人都开始犯这个错误。所以只提交遗漏的信息。plist文件解决了这个问题。希望这可以帮助别人。

#18


0  

i tried to re-select provisioning profile signing for both debug and release. this did fix the issue.

我尝试重新选择调试和发布的配置文件。这确实解决了问题。