Lipo Error!! can't open input file

こ雲淡風輕ζ 提交于 2019-11-27 13:24:35

问题


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:

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)


回答1:


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..

update After 6 months:

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.




回答2:


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

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




回答3:


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




回答4:


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.




回答5:


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

Hope that helps.




回答6:


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




回答7:


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.

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:


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.

At the bottom of my podfile, I added:

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

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

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




回答9:


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




回答10:


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)."

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.

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




回答11:


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.




回答12:


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




回答13:


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.

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




回答14:


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.




回答15:


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.




回答16:


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




回答17:


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.




回答18:


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




回答19:


This generally happens after changing the Deployment Targets in XCode and is easily solved by "Product > Clean" before attempting a Build.




回答20:


I'm using both Carthage and Cocoa Pods and this is how I fixed the issue without deleting "Remove Unneeded Architectures" in the Build Phases section:

• Go to "Build Phases" tab within your target

• Drag the "Remove Unneeded Architectures" (or whatever you called your script) to a higher row (e.g. above "Compile Sources").

• Clean and Build

Hope that helps!




回答21:


Go to your project directory, find build folder and delete it. Then do a build clean and then build project.

I hope this helps



来源:https://stackoverflow.com/questions/17348912/lipo-error-cant-open-input-file

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!