Xcode-报错问题总结大全
Intel芯片报错
-
问题描述:
xxx.xcodeproj Building for iOS, but the linked and embedded framework 'AliyunPlayerSDK.framework' was built for iOS + iOS Simulator.
解决办法:
- Change
Validate Workspace
setting in Xcode Build Settings toYES
.
M1芯片报错
-
YYKit
报错:ld: in /Users/xxx/Desktop/xxx/Pods/YYKit/Vendor/WebP.framework/WebP(libwebpencode_la-config.o), building for iOS Simulator, but linking in object file built for iOS, for architecture arm64
解决方法:
-
项目添加
如图:arm64
:打开路径:左侧项目名一级目录
->PROJECT
->项目名
->Build Settings
->Excluded Architectures
里面在Debug
和Release
模式下,分别添加:Any iOS Simulator SDK
->arm64
;
-
2. `Pod`添加`arm64`:打开路径:`左侧Pods一级目录` -> `PROJECT` -> `Pods` -> `Build Settings` -> `Excluded Architectures` 里面在`Debug`和`Release`模式下,分别添加:`Any iOS Simulator SDK` -> `arm64`;
如图:![0C2DCCC409D89A94F15CA5B8DA69366D.jpg](https://upload-images.jianshu.io/upload_images/2625770-b711f2c5a85455d9.jpg?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)