CocoadPods 安装中遇到的一些问题

在Pod install  的时候遇到的一些问题抓狂抓狂,下面例如:pod 'AFNetworking', '~> 3.1.0'  

1、[!] The dependency `AFNetworking (=3.1.0)` is not used in any concrete target.

解决方案大笑出现这个错误是由于CocoaPods的版本较高,在高版中需要添加target;

为了避免这种情况的出现,我们在创建Podfile文件的时候,

  • 不要使用$vim Podfile命令创建,使用它创建是空白文档;在高版本中需要手动配置;
  • 使用$pod init命令创建,在Podfile文件中,会自动出现下面代码;

# Uncomment this line to define a global platform for your project
# platform :ios, '9.0'

target 'MNTabbarDemo' do
  # Uncomment this line if you're using Swift or would like to use dynamic frameworks
  # use_frameworks!

  # Pods for MNTabbarDemo

  target 'MNTabbarDemoTests' do
    inherit! :search_paths
    # Pods for testing
  end

  target 'MNTabbarDemoUITests' do
    inherit! :search_paths
    # Pods for testing
  end

end




  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值