使用cocoapods 安装第三方框架报错target overrides the `OTHER_LDFLAGS`。。的解决方案

本文介绍了在使用CocoaPods时遇到属性冲突问题的三种解决方案:新建工程、替换属性值、修改pbxproj文件。每种方法都有其适用场景和优缺点,旨在帮助开发者高效解决问题。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

出现这种情况的原因可能是在自己的项目中先设置了属性(如:Build settings 设置Other Linker Flags 的属性: -fobjc-arc 
) ,后更新Podfile。

三种解决方法:

1、新建一个工程,先更新Podfile。再做其他的操作(把其他代码导入工程等),如涉及到项目中定义`PODS_ROOT` 和 `Other Linker Flags`的sdks是,查看这两个属性的地方,如果是有值的,就不用设置了,如果是空的,就根据SDK 里面的要求取设置。(这种方法虽笨,本人试过最后成功了)

2、想要使用 CocoaPods 中的设置,(Build settings 设置里面找)分别在项目中定义`PODS_ROOT` 和 `Other Linker Flags`的地方,把他们的值用`$(inherited)`替换掉,进入终端,执行(这种方法没试过,感觉很给力)

3、点击项目文件 project.xcodeproj,右键`显示包内容`,用文本编辑器打开`project.pbxproj`,删除`OTHER_LDFLAGS`的地方,保存,回到 Xcode,编译通过(这种方法可以解决当前的问题,但工程中其他代码可能会因为这个设置出问题,不建议使用)

[!] Unable to read the license file `LICENSE` for the spec `FirebaseAppCheckInterop (11.15.0)` [!] Unable to read the license file `LICENSE` for the spec `FirebaseAuth (11.8.1)` [!] Unable to read the license file `LICENSE` for the spec `FirebaseAuthInterop (11.15.0)` [!] Unable to read the license file `LICENSE` for the spec `FirebaseCore (11.8.1)` [!] Unable to read the license file `LICENSE` for the spec `FirebaseCoreExtension (11.8.0)` [!] Unable to read the license file `LICENSE` for the spec `FirebaseCoreInternal (11.8.0)` [!] Unable to read the license file `LICENSE` for the spec `FirebaseInstallations (11.8.0)` [!] Unable to read the license file `LICENSE` for the spec `Fyber_Marketplace_SDK (8.3.8)` [!] Unable to read the license file `LICENSE` for the spec `GoogleUtilities (8.1.0)` [!] Unable to read the license file `LICENSE` for the spec `RecaptchaInterop (100.0.0)` [!] Unable to read the license file `LICENSE` for the spec `FirebaseAppCheckInterop (11.15.0)` [!] Unable to read the license file `LICENSE` for the spec `FirebaseAuth (11.8.1)` [!] Unable to read the license file `LICENSE` for the spec `FirebaseAuthInterop (11.15.0)` [!] Unable to read the license file `LICENSE` for the spec `FirebaseCore (11.8.1)` [!] Unable to read the license file `LICENSE` for the spec `FirebaseCoreExtension (11.8.0)` [!] Unable to read the license file `LICENSE` for the spec `FirebaseCoreInternal (11.8.0)` [!] Unable to read the license file `LICENSE` for the spec `FirebaseInstallations (11.8.0)` [!] Unable to read the license file `LICENSE` for the spec `Fyber_Marketplace_SDK (8.3.8)` [!] Unable to read the license file `LICENSE` for the spec `GoogleUtilities (8.1.0)` [!] Unable to read the license file `LICENSE` for the spec `RecaptchaInterop (100.0.0)` [!] Unable to read the license file `LICENSE` for the spec `FirebaseAppCheckInterop (11.15.0)` [!] Unable to read the license file `LICENSE` for the spec `FirebaseAuth (11.8.1)` [!] Unable to read the license file `LICENSE` for the spec `FirebaseAuthInterop (11.15.0)` [!] Unable to read the license file `LICENSE` for the spec `FirebaseCore (11.8.1)` [!] Unable to read the license file `LICENSE` for the spec `FirebaseCoreExtension (11.8.0)` [!] Unable to read the license file `LICENSE` for the spec `FirebaseCoreInternal (11.8.0)` [!] Unable to read the license file `LICENSE` for the spec `FirebaseInstallations (11.8.0)` [!] Unable to read the license file `LICENSE` for the spec `Fyber_Marketplace_SDK (8.3.8)` [!] Unable to read the license file `LICENSE` for the spec `GoogleUtilities (8.1.0)` [!] Unable to read the license file `LICENSE` for the spec `RecaptchaInterop (100.0.0)` [!] Unable to read the license file `LICENSE` for the spec `FirebaseAppCheckInterop (11.15.0)` [!] Unable to read the license file `LICENSE` for the spec `FirebaseAuth (11.8.1)` [!] Unable to read the license file `LICENSE` for the spec `FirebaseAuthInterop (11.15.0)` [!] Unable to read the license file `LICENSE` for the spec `FirebaseCore (11.8.1)` [!] Unable to read the license file `LICENSE` for the spec `FirebaseCoreExtension (11.8.0)` [!] Unable to read the license file `LICENSE` for the spec `FirebaseCoreInternal (11.8.0)` [!] Unable to read the license file `LICENSE` for the spec `FirebaseInstallations (11.8.0)` [!] Unable to read the license file `LICENSE` for the spec `Fyber_Marketplace_SDK (8.3.8)` [!] Unable to read the license file `LICENSE` for the spec `GoogleUtilities (8.1.0)` [!] Unable to read the license file `LICENSE` for the spec `RecaptchaInterop (100.0.0)` [!] The `Unity-iPhone [Release]` target overrides the `ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES` build setting defined in `Pods/Target Support Files/Pods-Unity-iPhone/Pods-Unity-iPhone.release.xcconfig'. This can lead to problems with the CocoaPods installation
最新发布
08-07
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

启程Boy

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值