pods 更新

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

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容