最近项目相当紧张,回家之后还需要继续研究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. Java 年月日 日期加减

    public static String DATE_YEAR="YEAR";//年 public static String DATE_MONTH="MONTH" ...

  2. SQL 默认数据库被误删

    我今天也遇到了,自己解决了.这是我总结的:(不管这帖子沉到哪里了) 删除了SQL服务器默认数据库,无法连接服务器,用户[]登录失败. 1,使用管理员账户修改此用户的默认数据库.    企业管理器,展开 ...

  3. 浙大pat1050题解

    1050. String Subtraction (20) 时间限制 10 ms 内存限制 32000 kB 代码长度限制 16000 B 判题程序 Standard Given two string ...

  4. sqlalchemy相关知识

    #!/usr/bin/env python3.5 # -*- coding:utf8 -*- # 多对多关联 from sqlalchemy import Table, Column, Integer ...

  5. Centos 下安装Zabbix Linux 客户端

    今天在linux上安装了客户端,过程如下: (1)下载zabbix客户端软件 wget www.zabbix.com/downloads/2.0.3/zabbix_agents_2.0.3.linux ...

  6. 主机无法访问虚拟机的httpd服务

    症状:虚拟机装的centos6.3 通过桥接的方式与主机连接 虚拟机通过yum安装httpd服务 在主机浏览器中输入 虚拟机ip  无法访问虚拟机Apache 虚拟机和主机可以相互ping通 解决:关 ...

  7. Design Pattern - Strategy

    Strategy Pattern:     The Strategy Pattern defines a family of algorithms,encapsulates each one,and ...

  8. many bugs report when test bcm bt/wifi chip

    after change aerial  , many bugs diappear .

  9. 如何让文字和input框水平放在div里

    #text_input { height: 16px; width: 133px; margin-right: 5px; padding:0 0 0 3px; border: 1px solid #C ...

  10. SpringMVC的@ModelAttribute注解简单使用(用户修改信息)

    例如有一个User对象,我们要修改他的值,但是不能修改他的密码!通过表单提交数据之后,password为null,会把原对象的passwod覆盖掉.这时候可以用@ModelAttribute注解处理. ...