美文网首页
pods 更新

pods 更新

作者: 吃瓜群众呀 | 来源:发表于2016-05-11 14:43 被阅读73次

    For more information, see https://blog.cocoapods.org and the CHANGELOG for this version at https://github.com/CocoaPods/CocoaPods/releases/tag/1.0.0.beta.6

    Analyzing dependencies

    [!] The dependency `AFNetworking` is not used in any concrete target.

    The dependency `SDWebImage` is not used in any concrete target.

    ...

    竟然不好使,看了一下响应信息,发现版本号不对,记得之前升级到的版本是0.39.0,怎么突然变成1.0.0.beta.6了,可能是前几天好奇安装了cocoapods的mac客户端导致的。再看pod库的错误信息:

    [!] The dependency `AFNetworking` is not used in any concrete target.

    意思是:‘AFNetworking’依赖没有在任一具体的target下使用。

    打开Podfile文件查看:

    platform :ios,'7.0'

    # 网络访问

    pod 'AFNetworking'

    # 网络图片加载、缓存

    pod 'SDWebImage'

    ...

    原来之前写的太简单了,没有加source、target、release之类的信息。根据上面分析,可能是因为target的问题,于是修改成如下:

    platform :ios,'7.0'

    target 'JQDemoProgram' do

    # 网络访问

    pod 'AFNetworking', '~>2.0'

    # 网络图片加载、缓存

    pod 'SDWebImage', '~>3.7'

    ...

    end

    然后pod install,问题完美解决。

    总结:

    1. “not used in any concrete target.”的问题是因为Podfile文件没有配置target。

    2. 版本变成1.0.0.bate版是因为被CocoaPods的mac客户端覆盖了。

    3. 如果准备写一个长期项目,最好在创建Podfile文件时将source、target、release信息写全,避免日后被坑。

    pods基本使用

    http://www.360doc.com/content/14/0309/10/11029609_358970353.shtml

    相关文章

      网友评论

          本文标题:pods 更新

          本文链接:https://www.haomeiwen.com/subject/hflurttx.html