博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
iOS:在使用Cocoapods安装shareSDK时出现的link路径错误
阅读量:6813 次
发布时间:2019-06-26

本文共 2611 字,大约阅读时间需要 8 分钟。

CocoaPods 错误 target overrides the `OTHER_LDFLAGS`...

Xcode 升级到 6.0 后,更新 CocoaPods,出现了如下的警告

[!] The `Paopao [Debug]` target overrides the `PODS_ROOT` 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 `Paopao [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 `Paopao [Release]` target overrides the `PODS_ROOT` 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. [!] The `Paopao [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.
[!] Your Podfile has had smart quotes sanitised. To avoid issues in the future, you should not use TextEdit for editing it. If you are not using TextEdit, you should turn off smart quotes in your editor of choice.[!] The `KenJiao [Debug]` target overrides the `FRAMEWORK_SEARCH_PATHS` 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 `KenJiao [Release]` target overrides the `FRAMEWORK_SEARCH_PATHS` 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.

后果: 这种警告是不能忽视的,它带来的直接后果就是无法通过编译。

错误截图:

原因:产生此警告的原因是项目 Target 中的一些设置,CocoaPods 也做了默认的设置,如果两个设置结果不一致,就会造成问题。

解决办法:

1.分别在项目中定义`PODS_ROOT` 和 `Other Linker Flags`的地方,把他们的值用`$(inherited)`替换掉,进入终端,执行pod update ,上面的警告就解决一部分了;

2.在项目中定义的'Framework search paths'的地方,也是把他们的值用`$(inherited)`替换掉,最后编译,通过,ok!

 

$(inherited)作用:自动执行父类的相关代码,执行完后再回来执行系类的代码,也就是继承关系

 

网上还流行另外一种简单粗暴的方法

点击项目文件 project.xcodeproj,右键`显示包内容`,用文本编辑器打开`project.pbxproj`,删除`OTHER_LDFLAGS`的地方,保存,回到 Xcode,编译通过。

 

参考链接:

 

程序猿神奇的手,每时每刻,这双手都在改变着世界的交互方式!
本文转自当天真遇到现实博客园博客,原文链接:http://www.cnblogs.com/XYQ-208910/p/5436515.html
,如需转载请自行联系原作者
你可能感兴趣的文章
C#中的MemberwiseClone和clone的区别
查看>>
python-列表常用功能介绍
查看>>
CSS概念 - 可视化格式模型(二) 定位概述(普通流、绝对定位)
查看>>
TSF自定义候选词列表界面
查看>>
C++链接库
查看>>
HTML5中的全局属性
查看>>
exp命令ORACLCE10G导出ORACLE11G的数据1455错误
查看>>
'<>' operator is not allowed for source level below 1.7
查看>>
hdu 油菜花王国
查看>>
[CQOI2016]伪光滑数
查看>>
使用jquery.validate.js实现boostrap3的校验和验证
查看>>
八百呼电话录音系统--让通讯管理更安心
查看>>
02-线性结构1 两个有序链表序列的合并
查看>>
Python+numpy(3).md
查看>>
Java基础学习总结(85)——Java中四种线程安全的单例模式实现方式
查看>>
Mysql学习总结(9)——MySql视图原理讲解与使用大全
查看>>
DirectX 10 学习笔记7:环境光
查看>>
Segmentation fault (core dumped)
查看>>
openCV 二 图像处理
查看>>
Android 使用 ACTION_CALL 拨号
查看>>