解决办法:

1: 换镜像索引库

国内有人建立了cocoapods的索引库镜像,可以通过如下命令更改镜像:

pod repo remove master
  pod repo add master https://镜像地址
  pod repo update

我自己一向只喜欢官方源,所以这个方法我没用过,地址还请各位自行google

2: 删除镜像后重新下载[推荐]

对于这个方法为什么管用,我也不知道,据说是和xcode有某种关系,在stackoverflow上看到的。按说install时候下载不下来,这个方法也应该不管用才对。不过亲测好用。各位可以试试:

pod repo remove master #删除镜像
  pod setup #重新下载,可能需要等一段时间

这时候在执行pod install或者update,就可以顺利通过了,当然,还是要等的。

Last login: Thu Sep 24 16:29:08 on ttys000

nie-xiao-bo-mac-pro:~ mac$ cd /Users/mac/Desktop/paymodel/test/cocopodsTest/CocopodsTest

nie-xiao-bo-mac-pro:CocopodsTest mac$ pod repo remove master

Removing spec repo `master`

nie-xiao-bo-mac-pro:CocopodsTest mac$ pod setup

Setting up CocoaPods master repo

CocoaPods 0.39.0.beta.4 is available.

To update use: `gem install cocoapods --pre`

[!] This is a test version we'd love you to try.

For more information see http://blog.cocoapods.org

and the CHANGELOG for this version http://git.io/BaH8pQ.

Setup completed

nie-xiao-bo-mac-pro:CocopodsTest mac$ pod install

Analyzing dependencies

CocoaPods 0.39.0.beta.4 is available.

To update use: `gem install cocoapods --pre`

[!] This is a test version we'd love you to try.

For more information see http://blog.cocoapods.org

and the CHANGELOG for this version http://git.io/BaH8pQ.

Downloading dependencies

Installing Reachability (3.0.0)

Generating Pods project

Integrating client project

[!] Please close any current Xcode sessions and use `CocopodsTest.xcworkspace` for this project from now on.

nie-xiao-bo-mac-pro:CocopodsTest mac$

3: 禁止更新索引

通过如下参数,可以在安装或升级时跳过索引文件的更新,不过带来的问题也很麻烦,你可能下载不到新版本的第三方库(因为索引是旧的)。

pod install --verbose --no-repo-update 
  pod update --verbose --no-repo-update

CocoaPods停在Analyzing dependencies的解决方案的更多相关文章

  1. CocoaPods停在Analyzing dependencies解决方案

    现在很多开源项目应用cocoapod.这使集成第三方库都非常方便,在没有花project里设置哪些参数.仗着. 只要运行pod update要么pod install时间,经常会卡在Analyzing ...

  2. cocoaPads 安装及出现Analyzing dependencies之后卡死解决方案

    1.安装 a. 查看源 gem sources -l b. 设置源: sudo gem sources -a http://ruby.taobao.org c. 删除源:sudo gem source ...

  3. cocoapods安装和使用常见问题及解决方案

    cocopods安装后pod install出现以下错误 /usr/local/Cellar/ruby/2.4.1_1/lib/ruby/2.4.0/rubygems.rb:270:in find_s ...

  4. Xcode-调试断点不能停在代码区终极解决方案

    转发 调试断点不能停在代码区终极解决方案:  http://mobile.51cto.com/iphone-390082.htm

  5. cocoapod卡在了analyzing dependencies

    尽管公司的项目没有使用cocoapod,可是有一些第三方库本身依赖其它第三方的库,而且是用cocoapod来管理这些依赖的.所以在使用某些第三方库时.还是须要用到cocoapod的.今天在github ...

  6. cocoapods Analyzing dependencies 问题的解决方案

    pod install --verbose --no-repo-update pod update --verbose --no-repo-update 修改就ok了

  7. 长时间停留在calculating requirements and dependencies 的解决方案

    如果Eclipse花费了很长的时间calculating requirements and dependencies(计算需求和依赖性 ) 这个问题通常就是在点击安装之后显示“Calculating ...

  8. cocospods 卡在 Analyzing dependencies

    參考链接:http://www.cocoachina.com/bbs/read.php? tid=193398 关于pod stetup的详解在这里.对于初次使用CocoaPods的同学,即使你不使用 ...

  9. Eclipse下Java Build Path下Libraies中添加 Maven dependencies 失败解决方案

    当maven 仓库有jar时,tomcat生成时总是报javaclassno..........无这个文件:用一下方法 转载:http://bugyun.iteye.com/blog/2311848 ...

随机推荐

  1. tcl -mode

    -exact     严格匹配(如string equal) -glob 通配符式匹配(string match) -regexp   正则表达式匹配(regexp) array get和array ...

  2. maven插件介绍之tomcat7-maven-plugin

    tomcat7-maven-plugin插件的pom.xml依赖为: <dependency> <groupId>org.apache.tomcat.maven</gro ...

  3. (转)const char to LPCTSTR不能转化问题

    转: const char to LPCTSTR不能转化问题 Visual C++ 2008里cannot convert parameter 1 from 'const char [13]' to ...

  4. [TypeScript] Sharing Class Behavior with Inheritance in TypeScript

    Typescript classes make inheritance much easier to write and understand. In this lesson we look into ...

  5. 算法 Tricks(四)—— 判断序列中的字符/数值是否交替出现

    比如:353, 54545,数字都是交替出现的: bool alternate = true; for (int i = 0; i < M.size(); ++i){ if (M[i] != M ...

  6. Android系统开发(7)——标准I/O与文件锁

    一.常用函数 fopen: FILE *fopen(const char *filename, const char *mode); fread: size_t  fread(void *ptz, s ...

  7. ZOJ 2405 Specialized Four-Digit Numbers

    http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemId=1405 要求找出4位数所有10进制.12进制.16进制他们各位数字之和相等. # ...

  8. Android隐藏输入法

    输入法隐藏两种方式: /** * 隐藏输入法 * * @param myActivity */ public static void hideInput(Activity myActivity,Edi ...

  9. 【TP SRM 703 div2 500】 GCDGraph

    Problem Statement You are given four ints: n, k, x, and y. The ints n and k describe a simple undire ...

  10. .NET Framework基础知识(四)(转载)

    .反射:是编程的读取与类型相关联的元数据的行为.通过读取元数据,可以了解它是什么类型以及类型的成员. 比如类中的属性,方法,事件等.所属命名空间System.Reflection. 例:using S ...