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。

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

  • 相关阅读:
    kmeans 聚类
    HTTP与HTTPS相关知识
    如何和统计学家分享数据How to share data with a statistician
    使用 Python 进行 T检验
    Jupyter Lab目录插件安装
    【Python项目】爬取新浪微博个人用户信息页
    【Python项目】爬取新浪微博签到页
    使用SVN服务器管理源码
    [转载]C++命名规则
    C++&OpenCV中读取灰度图像到数组的两种
  • 原文地址:https://www.cnblogs.com/qingpeng/p/5567985.html
Copyright © 2011-2022 走看看