Architecture linking error after Xcode 5.1 upgrade

2019-04-01 00:10发布

I am having these errors:
libGPUImage.a, file was built for archive which is not the architecture being linked (armv7s),
libPods.a, file was built for archive which is not the architecture being linked (armv7s)
and more...

These are my project settings:
Architectures:armv7,armv7s,arm64
Build Active Architectures Only:NO
Valid Architectures;armv6 armv7 armv7s arm64 i386

I didn't change anything except for downloading latest Xcode 5.1 with the iOS 7.1 SDK. This project worked fine with Xcode 5.0 and iOS 7.0 SDK. What could be the problem?

5条回答
forever°为你锁心
2楼-- · 2019-04-01 00:36

I had a bunch of similar issues upgrading to Xcode 5.1. I resolved them by first updating CocoaPods:

gem update cocoapods

Then updating the pods in my project:

pod update

In my case, there was some corrupted stuff in my ~/.cocoapods directory which was causing pod to throw errors. Deleting everything in ~/.cocoapods then running pod update again got things working again.

查看更多
放荡不羁爱自由
3楼-- · 2019-04-01 00:38

Got to Build Settings -> Architectures

You probably have Standard Architectures set, right?

As of Xcode 5.1 Standard Architectures includes arm64, which you are not ready to support.

Select Other..

doubleclick $(ARCHS_STANDARD) and change it to $(ARCHS_STANDARD_32_BIT)

Note: This is a temporary fix. You are probably using some static library that didn't come with a 64-bit slice. See if there is one available and then switch Architecture back to Standard Architectures.

查看更多
乱世女痞
4楼-- · 2019-04-01 00:47

In my case, it was fixed by changing _view to self.view.

查看更多
爱情/是我丢掉的垃圾
5楼-- · 2019-04-01 00:49

We had this same thing happen to us, the problem is "Standard Architectures" under "Architectures" used to be armv7, armv7s, in Xcode 5.1 Apple changed "Standard Architectures" to be armv7, armv7s, arm64 so now you have to manually enter your own architectures instead of picking "Standard".

查看更多
地球回转人心会变
6楼-- · 2019-04-01 00:59

Open in some text editor (for instance SublimeText) your ./Pods/Pods.xcodeproj/project.pbxproj file. Usually with the following command in the terminal (keep in mine you have to be in your project directory) st ./Pods/Pods.xcodeproj/project.pbxproj and find and replace ONLY_ACTIVE_ARCH = YES with ONLY_ACTIVE_ARCH = NO. Also you can do the same with your {YOUR_PROJECT}.xcodeproj/project.pbxproj. And last Clean and Run from the Xcode!

enter image description here

查看更多
登录 后发表回答