安装CocoaPods pod install报错 - Analyzing dependencies [!] The dependency `AFNetworking` is not used in any concrete target.

1.$ pod install

Analyzing dependencies

出现下面的错误:

安装CocoaPods pod install报错 - Analyzing dependencies [!] The dependency `AFNetworking` is not used in any concrete target._第1张图片

$pod --version 查看版本

  1.2.1

2.解决方式:

1).在创建Podfile的时候,用这种格式使用,

platform :ios,'8.0'

#use_frameworks!   个别需要用到它reactiveCocoa

target 'PodDemo' do

pod 'AFNetworking', '~> 3.0'

pod "Masonry"

pod "MJRefresh"

pod "SDWebImage"

pod 'MBProgressHUD', '~> 1.0.0'

end

里面的 PodDemo 记得替换为自己工程里面的target。这样就基本OK了,

执行pod install / pod update 就都可以了。

2).下面是另外一种写法,

platform :ios, '8.0'

#use_frameworks! 个别需要用到它,

def pods

pod 'AFNetworking', '~> 3.0'

pod "Masonry"

pod "MJRefresh"

pod "SDWebImage"

pod 'MBProgressHUD', '~> 1.0.0'

end

target 'PodDemo' do

pods

end

你可能感兴趣的:(安装CocoaPods pod install报错 - Analyzing dependencies [!] The dependency `AFNetworking` is not used in any concrete target.)