最近项目相当紧张,回家之后还需要继续研究android源码。

从网上找了一些资料,下载过程中还是遇到了很多问题。这里罗列一下:

1. 下载Repo过程中提示证书问题:

curl https://dl-ssl.google.com/dl/googlesource/git-repo/repo > ~/bin/repo

curl: (60) SSL certificate problem: unable to get local issuer certificate

More details here: http://curl.haxx.se/docs/sslcerts.html
 
curl performs SSL certificate verification by default, using a "bundle"
 of Certificate Authority (CA) public keys (CA certs). If the default
 bundle file isn't adequate, you can specify an alternate file
 using the --cacert option.
If this HTTPS server uses a certificate signed by a CA represented in
 the bundle, the certificate verification probably failed due to a
 problem with the certificate (it might be expired, or the name might
 not match the domain name in the URL).
If you'd like to turn off curl's verification of the certificate, use
 the -k (or --insecure) option../bin/repo: 行 1: 未预期的符号 `newline' 附近有语法错误
./bin/repo: 行 1: `<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">'
 
从baidu搜索到:
在验证证书的时候出现问题,是本地ssl判别证书太旧,导致报ssl证书错误

下载新的ssl本地判别文件
     wget http://curl.haxx.se/ca/cacert.pem
 并更名为ca-bundle.crt放置到默认目录
      mv cacert.pem ca-bundle.crt  | mv ca-bundle.crt /etc/pki/tls/certs/
 或者curl  –cacert cacert.pem 方式指定调用
 
这里参考了一个网友的做法:
将https换成http链接进行下载,OK
 
2.  ./bin/repo: 行 1: 未预期的符号 `newline' 附近有语法错误
  ./bin/repo: 行 1: `<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">'
 
由于

服务器无法访问导致android的源码无法下载,这是另外一个git服务器的android源码的repo文件。

操作如下

$ curl "http://php.webtutor.pl/en/wp-content/uploads/2011/09/repo" > ./repo //获取repo

$ chmod a+x repo
 3. repo sync,出现“fatal: '../platform/abi/cpp.git' does not appear to be a git repository”
 
解决办法 :
  打开.repo目录下的manifest.xml文件(命令vim manifest.xml),并找到fetch属性,在我的文件中显示fetch="..",将fetch修改为fetch="git://android.git.linaro.org/",OK
 

获取android源码中遇到的问题的更多相关文章

  1. Eclipse与Android源码中ProGuard工具的使用

    由于工作需要,这两天和同事在研究android下面的ProGuard工具的使用,通过查看android官网对该工具的介绍以及网络上其它相关资料,再加上自己的亲手实践,算是有了一个基本了解.下面将自己的 ...

  2. Kernel.org 被黑,获取 Android 源码方法一则

    8 月底 9 月初,作为 Linux 的老窝,Kernel.org 被黑客攻击了,其攻击原因众说纷纭.一直以来 Linux 对于我来说不是很感兴趣,所以从来不会关注类似事件,可是这次这个攻击,却影响到 ...

  3. Eclipse与Android源码中ProGuard工具的使用(代码混淆)

    由于工作需要,这两天和同事在研究android下面的ProGuard工具的使用,通过查看android官网对该工具的介绍以及网络上其它相关资料,再加上自己的亲手实践,算是有了一个基本了解.下面将自己的 ...

  4. Android源码中的FLAG为何使用16进制

    1.在阅读源码的时候经常发现有一些标志属性使用一些位操作来判断是否具有该标志,增加标志或者去除标志. 比如View.java中的 /** * This view does not want keyst ...

  5. 获取android源码时repo的错误

    今天用repo获取android源码:../bin/repo init -u git://android.git.kernel.org/platform/manifest.git出现问题:问题一:Tr ...

  6. 关于android源码中的APP编译时引用隐藏的API出现的问题

    今天在编译android源码中的计算器APP时发现,竟然无法使用系统隐藏的API,比如android.os.ServiceManager中的API,引用这个类时提示错误,记忆中在android源码中的 ...

  7. 访何红辉:谈谈Android源码中的设计模式

    最近Android 6.0版本的源代码开放下载,刚好分析Android源码的技术书籍<Android源码设计模式解析与实战>上市,我们邀请到它的作者何红辉,来谈谈Android源码中的设计 ...

  8. 在Android源码中查找Java代码中native函数对应的C++实现

    Android源码中很多关键代码都是C++实现的,java通过jni来调用,经常会看到java中这样的代码: static native Thread currentThread(); 如何根据方法名 ...

  9. (转)获取android源码时repo的错误

    获取android源码时repo的错误 今天用repo获取android源码:../bin/repo init -u git://android.git.kernel.org/platform/man ...

随机推荐

  1. 在VMware上安装CentOS -7步骤详解

    在VMware上安装CentOS -7 一.下载好VMware虚拟机 二.准备好CentOS的镜像文件 在这里安装之前博主都已准备好了. 废话就少啰嗦啦!现在开始安装步骤了 1.首先打开VMware创 ...

  2. 分布式存储 CentOS6.5虚拟机环境搭建FastDFS-5.0.5集群(转载-2)

    原文:http://www.cnblogs.com/PurpleDream/p/4510279.html 分布式存储 CentOS6.5虚拟机环境搭建FastDFS-5.0.5集群 前言:       ...

  3. webp图片详解

    WebP(发音 weppy),是一种支持有损压缩和无损压缩的图片文件格式,派生自图像编码格式 VP8.根据 Google 的测试,无损压缩后的 WebP 比 PNG 文件少了 45% 的文件大小,即使 ...

  4. 【Python】使用super初始化超类

    初始化超类的传统方式,在子类的实例中调用超类的__init__()方法. 但是传统的方法有两个问题,比如: 问题1: class MyBaseClass: def __init__(self, val ...

  5. Java中eclipse中添加源码依赖

    Window ->Preferences ->Java->instanlled jres  ->editrt.jarsource attachment一般在jdk的目录下的sr ...

  6. HTTPS详解

    HTTPS(Hypertext Transfer Protocol over Secure Socket Layer,基于SSL的HTTP协议)使用了HTTP协议,但HTTPS使用不同于HTTP协议的 ...

  7. Centos6.5环境中安装vsftp服务

    1.检查vsftp是否安装 命令:rpm -qa|grep vsftpd 若已经安装,则显示相关的版本信息,否则什么也没有. 也可以输入find -name "vsftpd" -p ...

  8. 网站引导页flash动画跳转js脚本

    if (getCookie("guidance") == null) { document.cookie = "guidance=true"; window.l ...

  9. Java实现二叉树先序,中序,后序遍历

    以下是我要解析的一个二叉树的模型形状 接下来废话不多直接上代码 一种是用递归的方法,另一种是用堆栈的方法: 首先创建一棵树: public class Node { private int data; ...

  10. 使用vs2010打开VS2013的工程文件

    在开发团队,会出现vs工具使用版本的不一样的情况.我的电脑使用的是VS2010,可是其他人员使用的是vs2013. 要打开其他人员上传的工程文件,可以通过三种方式: 1.下载一个vs2013版本. 2 ...