• 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。

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

  • 相关阅读:
    机器学习进度09(逻辑回归)
    机器学习进度08(过欠拟合、岭回归)
    机器学习进度07(线性模型、损失函数、优化方法)
    Python绘制心形图(动态)
    Python发送QQ消息
    Python免费发送手机短信,推送消息
    Anaconda的安装与环境配置以及jupyter的使用
    第一章 概念部分
    k8s简介
    安装k8s遇到的问题
  • 原文地址:https://www.cnblogs.com/qingpeng/p/5567985.html
Copyright © 2020-2023  润新知