CocoaPods执行操作时提示The dependency is not used in any concrete target

文章目录
  1. 解决办法

前几天升级了CocoaPods,执行$ brew upgrade,CocoaPods被升级到了1.0.0.beta.2,在我给项目设置好podfile添加依赖的时候,出现了错误。

提示错误如下:

1
2
The dependency `SDWebImage` is not used in any concrete target.
The dependency `AFNetworking` is not used in any concrete target.

解决办法

根据错误提示,说我们没有具体的target,那我们给他指定一个就好了。查询了下podfile的语法,可以用如下方法给库添加target:

1
2
3
4
5
6
7
8
9
10
11
12
platform:ios,'8.0'
target "iHBNU" do
pod 'AFNetworking'
pod 'Mantle'
pod 'IQKeyboardManager'
pod 'FXBlurView'
pod 'SVProgressHUD'
pod 'JTCalendar'
pod 'ZFDragableModalTransition'
pod 'MJExtension'
end

也就是添加了一个循环,指定了target。

问题解决。