Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/ios/105.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/codeigniter/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ios CocaPods导入AFNetworking但不导入OHAttributedLabel_Ios_Cocoapods - Fatal编程技术网

Ios CocaPods导入AFNetworking但不导入OHAttributedLabel

Ios CocaPods导入AFNetworking但不导入OHAttributedLabel,ios,cocoapods,Ios,Cocoapods,我正在使用CocaPods将AFNetowrking和OHAttributedLabel添加到我的项目中。我安装了这两个库AFNetworking在我的项目中导入得很好。但是OHAttributedLabel不是。我不知道为什么 播客文件 安装两个库之后,当我导入 #import "AFHTTPClient.h" #import "AFJSONRequestOperation.h" #import "UIImageView+AFNetworkin

我正在使用CocaPods将
AFNetowrking
OHAttributedLabel
添加到我的项目中。我安装了这两个库
AFNetworking
在我的项目中导入得很好。但是
OHAttributedLabel
不是。我不知道为什么

播客文件 安装两个库之后,当我导入

#import "AFHTTPClient.h"
#import "AFJSONRequestOperation.h"
#import "UIImageView+AFNetworking.h"
我没有任何错误,一切都很好

但是当我试图导入

#import <OHAttributedLabel/OHAttributedLabel.h>
#import <OHAttributedLabel/NSAttributedString+Attributes.h>
#import <OHAttributedLabel/OHASBasicMarkupParser.h>
建议说

确保您的项目正在使用Pods.xcconfig。检查一下 选择您的项目文件,然后在第二个窗格中再次选择它并 在第三个窗格中打开“信息”部分。在你的帮助下 应为每个需要您的配置选择Pods.xcconfig 安装的吊舱

我不知道该在哪里添加此内容。这就是我的配置的样子

编辑 复制pods.xcconfig后


这听起来可能很傻,但您是否正在尝试在您的工作区而不是您自己的应用程序项目中构建和运行Pods项目?我已经犯过很多次这样的错误,也看到过类似的错误

看起来您缺少正确的配置集

您的项目信息应该如下所示


在具有自定义编译器/链接器标志(如标题搜索路径和/或其他链接器标志)的项目上安装POD时,您会遇到这些错误(通过“标题搜索路径”或“其他链接器标志”目标设置)。这些设置将覆盖pods配置文件,因为配置文件的优先级低于目标设置

要解决此问题,您需要将$(继承的)添加到标题\u搜索\u路径以及目标生成设置中的其他更改标志。只需将其附加到末尾,如下所示:

还要注意的是,当您使用pod install安装pod时,如果您设置了可能受影响的自定义标志,则应使用如下消息警告您:

[!]从现在开始使用
myprojectname

[!]目标
myprojectname[Debug]
覆盖
其他\u LDFLAGS
Pods/Pods.xconfig'中定义的生成设置。
-使用
$(继承)`标志,或 -从目标中删除生成设置

[!]目标
myprojectname[Debug]
覆盖
HEADER\u SEARCH\u路径
Pods/Pods.xcconfig'中定义的生成设置。 -使用$(继承)`标志,或 -从目标中删除生成设置

[!]目标
myprojectname[Debug-Release]
覆盖
其他\u LDFLAGS
Pods/Pods.xcconfig'中定义的生成设置。
-使用
$(继承)`标志,或 -从目标中删除生成设置

[!]目标
myprojectname[Debug-Release]
覆盖
HEADER\u SEARCH\u路径
Pods/Pods.xcconfig'中定义的生成设置。 -使用$(继承)`标志,或 -从目标中删除生成设置


转到taget构建设置->其他链接器标志->双击。将$(继承的)添加到新行。

你能更具体一点,也许还可以包括你的
Podfile
?@GabrielePetronella谢谢你的快速回复,请查看我的编辑。发生了什么事?这会给你带来任何错误吗?@GabrielePetronella是的,我添加了更多细节。我很抱歉没有具体说明,我只是试着做同样的事情,而且效果完美无瑕。你试过清理你的项目并重新打开它吗?亚当,不,我在运行我的应用:)不是PodsHa,值得一试。祝你好运。你的项目中应该有一个文件名
Pods.xcconfig
。你能看到吗?看起来,现在你应该能够在项目设置的信息窗格中看到配置集
Pods
。有没有办法完全删除CocaPods并再次添加?你认为这会有帮助吗?你可以尝试更新CocoaPods gem并重新运行pod安装。在这一点上,我建议尝试创建一个全新的项目,只是链接两个库,看看它是否有效。我认为你当前项目的设置有一些不好的地方。
#import <OHAttributedLabel/OHAttributedLabel.h>
#import <OHAttributedLabel/NSAttributedString+Attributes.h>
#import <OHAttributedLabel/OHASBasicMarkupParser.h>
Resolving dependencies of `./Podfile'
Updating spec repositories

Cocoapods 0.17.0.rc7 is available.

Resolving dependencies for target `default' (iOS 6.0)
Downloading dependencies
Using AFNetworking (1.1.0)
Installing OHAttributedLabel (3.4.1)
Generating support files