'Pod search xxx' 输出日志`[!

作者: 关键我也没 | 来源:发表于2017-01-10 11:17 被阅读26次

pod search来搜索类库信息时,总是

[!] Unable to find a podwithname, author, summary, or descriptionmatching'······'

处理方法:

1.执行pod setup

pod setup

其实在你安装CocoaPods执行pod install时,系统会默认操作pod setup,然而由于中国强大的墙可能会pod setup不成功。这时就需要手动执行pod setup指令,如下:

2. SetUp

终端输入:

 pod setup  

终端显示Setting up CocoaPods master repo,稍等几十秒,最底下会输出Setup completed。说明执行pod setup成功。

3.如果pod search操作还是搜索失败,如下:(如果search成功则跳过此步骤)

终端输入:

pod search AFNetworking

如果输出日志:

Unable to find a pod with name, author, summary, or descriptionmatching 'AFNetworking'

这时就需要继续下面的步骤了。

4.删除~/Library/Caches/CocoaPods目录下的search_index.json文件:

终端输入:

rm ~/Library/Caches/CocoaPods/search_index.json

删除成功后,再执行pod search。

原因:pod setup成功后,依然不能pod search,是因为之前你执行pod search生成了search_index.json,此时需要删掉。

5.执行pod search

终端输入:

pod search afnetworking

输出:

Creating search index for spec repo 'master'.. Done!

稍等片刻······就会出现所有带有afnetworking字段的类库。

相关文章

网友评论

    本文标题:'Pod search xxx' 输出日志`[!

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