架构为armv7的Cocoapods库出现未定义符号

29
我在一个项目中遇到了问题。该项目使用Cocoapods来管理其库。我像往常一样运行pod install开始工作,但是Xcode却给我报错:Undefined symbols for architecture armv7,如下图所示:

enter image description here

这些符号都是我在项目中使用的库,例如AFNetworking、RNBlurModalView等。我尝试从项目中删除所有与Cocoapods相关的文件,然后再次运行pod install,但仍无法解决问题。
我已经尝试过以下操作:
  • 清理项目并重新构建。
  • 删除与Cocoapods相关的文件,然后再次运行pod install
  • 尝试将类添加到项目目标的Compile Sources中,但无法添加。该类位于Pods的工作区中。
  • 将Build Active Architecture Only从YES更改为NO
我还尝试了相同问题的解决方案,但没有一个对我有效。
如果有帮助的话,我正在使用xCode6和Cocoapods 0.34.4。该项目的有效架构为armv7和armv7s更新: 当运行pod install --verbose时。
Integrating client project

Integrating target `Pods` (`AIYOCore.xcodeproj` project)

[!] The use of implicit sources has been deprecated. To continue using all of the sources currently on your machine, add the following to the top of your Podfile:

    source 'https://github.com/CocoaPods/Specs.git'


[!] The `Project [Debug]` target overrides the `OTHER_LDFLAGS` build setting defined in `Pods/Target Support Files/Pods/Pods.debug.xcconfig'. This can lead to problems with the CocoaPods installation
    - Use the `$(inherited)` flag, or
    - Remove the build settings from the target.

[!] The `Project [Release]` target overrides the `OTHER_LDFLAGS` build setting defined in `Pods/Target Support Files/Pods/Pods.release.xcconfig'. This can lead to problems with the CocoaPods installation
    - Use the `$(inherited)` flag, or
    - Remove the build settings from the target.

提前致谢。

2个回答

72

看起来您的 OTHER LINKER FLAGS 中没有 $(inherited)。 请发布 pod install 的输出结果。


忽略警告的习惯!该死! - 0xC0DED00D
我遇到了同样的问题,我已经添加了$(inherited),但它仍然无法正常工作...仍然显示上面的错误。但是我只能使用arm64构建..有任何想法为什么这仍然出现? - NFerocious
你的一些库可能只提供了arm64架构的预编译二进制文件? - Andrei Shender
你的解决方案一次就成功了。你节省了我的时间。非常感谢。 - iDevAmit
哇,我按照这个故障排除指南(https://guides.cocoapods.org/using/troubleshooting.html)中的所有步骤都走了一遍,但仍然没有解决问题。不过,这个方法却奏效了!谢谢 :) - PostCodeism
显示剩余3条评论

1

您可能只需要清理构建文件夹(⌥⇧⌘K)。

enter image description here


网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接