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

1.$ pod install

Analyzing dependencies

出现下面的错误:

$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

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容