xcode Pods 被拒绝作为“libPods.a”的隐式依赖项,因为其架构“XXX”不包含所有必需的架构

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

Pods was rejected as an implicit dependency for 'libPods.a' because its architectures 'XXX' didn't contain all required architectures

xcodecompiler-errorscocoapods

提问by C-A

A friend updated Cocoapods in our project. When I pulled the latest stuff from git I got the following error:

一位朋友在我们的项目中更新了 Cocoapods。当我从 git 中提取最新的东西时,出现以下错误:

Pods was rejected as an implicit dependency for 'libPods.a' because its architectures 'x86_64' didn't contain all required architectures 'i386'

This results in

这导致

ld: library not found for -lPods-___PODLIBRARY____
clang: error: linker command failed with exit code 1 (use -v to see invocation)

I have searched around for hours now trying to find it. The most common fixes I've tried are..

我已经搜索了几个小时试图找到它。我尝试过的最常见的修复方法是..

  • Deleted derived data
  • Delete build data
  • Delete pods, and reinstalled with 'pod install'
  • Clean project
  • All of the above at the same time
  • Experimented with 'Build Active Architecture Only', both in our project and in Pod Project. Inserted armv7 and armv7s as hard code instead of $ variable
  • Experimented with 'Architectures', both in our project and in Pod Project. Inserted armv7 and armv7s as hard code instead of $ variable
  • 删除派生数据
  • 删除构建数据
  • 删除 pod,并使用“pod install”重新安装
  • 清洁工程
  • 以上所有同时
  • 在我们的项目和 Pod 项目中尝试了“仅构建活动架构”。插入 armv7 和 armv7s 作为硬代码而不是 $ 变量
  • 在我们的项目和 Pod 项目中尝试了“架构”。插入 armv7 和 armv7s 作为硬代码而不是 $ 变量

We are aiming for iOS 8, iPhones.

我们的目标是 iOS 8、iPhone。

My friend got it to work by combining the first 4 options, but I cannot.

我的朋友通过结合前 4 个选项让它工作,但我不能。

Does anyone have any suggestions? We're supposed to release before christmas so production time is precious :D

有没有人有什么建议?我们应该在圣诞节前发布,所以制作时间很宝贵 :D

回答by ananas

Try to set Build Active Architecture Onlyto NOfor 'Pods' project and your app's target

尝试设置Build Active Architecture OnlyNO了“荚”项目和应用程式的目标

回答by Luis Ferro

For me, what worked was to change the CocoaPod project "Base SDK" to "Latest iOS".

对我来说,有效的是将 CocoaPod 项目“Base SDK”更改为“Latest iOS”。

回答by Ruud Visser

Try to run the project first on an iPhone 4s in simulator and after that it should work.

尝试首先在模拟器中的 iPhone 4s 上运行该项目,然后它应该可以工作。

回答by Catarino

What fixed this problem for me was precisely the opposite of the most voted answer:

对我来说解决这个问题的恰恰与投票最多的答案相反:

"Build Active Architecture Only" set to "YES"

“仅构建活动架构”设置为“是”

both in main target and Pods target + Debug and Release

主要目标和 Pods 目标 + 调试和发布

回答by Aleksandar Vaci?

Also make sure that your podfile targets the same iOS version your project targets:

还要确保您的 podfile 目标与您的项目目标相同的 iOS 版本:

For example, if you're targeting iOS 10.0 in your Xcode project your podfile should include platform :ios, '10.0' at the top, too.

例如,如果您在 Xcode 项目中针对 iOS 10.0,则 podfile 也应在顶部包含平台 :ios,“10.0”。

Per this solution, which was the problem in my case.

根据这个解决方案,这就是我的问题。

回答by Andrew Smith

In my case, it was because I had the "Build Active Architecture Only" parameter set to Yes for Debug mode. Changing it no No fixed it.

就我而言,这是因为我将调试模式的“仅构建活动架构”参数设置为是。改变它没有没有修复它。