首页 > Web开发 > 详细

CocoaPods报错:The dependency `AFNetworking ` is not used in any concrete target

时间:2016-12-12 11:38:26      阅读:298      评论:0      收藏:0      [点我收藏+]

最近更新了下cocoapods,今天再pod update  就遇到这个错误:

技术分享

 

大体意思就是说,库没有用到指定的target。

找了下资料,发现是新版CocoaPods在 Podfile里使用时,必须指定target:

比如:

platform:ios,‘7.0‘
target ‘TestSwift’ do

pod ‘AFNetworking‘
pod ‘SDWebImage‘
pod ‘JSONModel‘
pod ‘MJRefresh‘
pod ‘SDCycleScrollView‘,‘~> 1.64‘

end

 

解决方法: 

添加

target ‘TestSwift’ do

end

这两段首尾声明即可。

 

注意:TestSwift是你的target名

其实,在旧版本,如果我们一个项目里含多个target时,要在不同target里引用第三方库,也是必须指定具体target的,只不过现在升级后,要求即使一个target,也要指定一下,这样就是更正规一点了。

CocoaPods报错:The dependency `AFNetworking ` is not used in any concrete target

原文:http://www.cnblogs.com/yajunLi/p/6163725.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!