zoukankan      html  css  js  c++  java
  • CocoaPods报错:The dependency 'xxx' is not used in any concrete target

    CocoaPods升级后(最新版本1.0.0),安装第三方库的时候会报如下错误:

      The dependency `SDWebImage (~> 3.7.6)` is not used in any concrete target.

      The dependency `SVProgressHUD (~> 2.0.3)` is not used in any concrete target.

      The dependency `AFNetworking (~> 3.1.0)` is not used in any concrete target.

    原因:CocoaPods升级后,Podfile文件的内容格式要求发生了变化,必须指出指出所用第三方库的target。

    解决步骤:

         (1)检查CocoaPods的版本

                pod --version

          (2) 升级或安装最新版本(目前版本1.0.0)

               注意:如果cocoapods已经是1.0.0版本,则跳过该步骤直接进入第三个步骤。

               升级命令:sudo gem update -n /usr/local/bin --system

         安装命令:sudo gem install -n /usr/local/bin cocoapods

          (3)修改Podfile的内容

            修改前的Podfile文件的内容:      

    platform:ios,'7.0'
    pod 'MJRefresh', '~> 3.1.0'
    pod 'SDWebImage', '~> 3.7.6'
    pod 'SVProgressHUD', '~> 2.0.3'
    pod 'AFNetworking', '~> 3.1.0'

       修改后的Podfile文件的内容:

    platform:ios,'7.0'
    target "MyTarget" do
    pod 'MJRefresh', '~> 3.1.0'
    pod 'SDWebImage', '~> 3.7.6'
    pod 'SVProgressHUD', '~> 2.0.3'
    pod 'AFNetworking', '~> 3.1.0'
    end

      在Podfile文件中需要明确指出使用第三方库的target。

    通过以上三个步骤 问题完美解决   ^_^

  • 相关阅读:
    团队作业3--需求改进&系统设计
    需求分析&原型设计
    团队项目作业1-团队展示
    结对编程
    APP案例分析之华为浏览器
    四则运算生成器做法思路
    关于PHP使用GD库生成的验证码无法在别处显示
    第二次课程心得
    两个程序代码
    5.8下午
  • 原文地址:https://www.cnblogs.com/qingpeng/p/5567985.html
Copyright © 2011-2022 走看看