android 源码下载及问题
2013-10-29 22:12
453 查看
To install Repo:
Make sure you have a bin/ directory in your home directory and that it is included in your path:
Download the Repo tool and ensure that it is executable:
After installing Repo, set up your client to access the Android source repository:
Create an empty directory to hold your working files. If you're using MacOS, this has to be on a case-sensitive filesystem. Give it any name you like:
Run
Make sure you have a bin/ directory in your home directory and that it is included in your path:
$ mkdir ~/bin $ PATH=~/bin:$PATH
Download the Repo tool and ensure that it is executable:
$ curl http://commondatastorage.googleapis.com/git-repo-downloads/repo > ~/bin/repo $ chmod a+x ~/bin/repo
After installing Repo, set up your client to access the Android source repository:
Create an empty directory to hold your working files. If you're using MacOS, this has to be on a case-sensitive filesystem. Give it any name you like:
$ mkdir WORKING_DIRECTORY $ cd WORKING_DIRECTORY
Run
repo initto bring down the latest version of Repo with all its most recent bug fixes. You must specify a URL for the manifest, which specifies where the various repositories included in the Android source will be placed within your working directory.
$ repo init -u https://android.googlesource.com/platform/manifest[/code] To check out a branch other than "master", specify it with -b:$ repo init -u https://android.googlesource.com/platform/manifest -b android-4.0.1_r1
$ repo syn实际操作中,获得错误报告:fatal: Cannot get https://gerrit.googlesource.com/git-repo/clone.bundle, 这个地址和你看到的可能不同,但肯定是 ~/bin/repo 第5行或第6行REPO_URL 所表示的网址。
stockoverflow上有贴提及是代理环境变量造成的问题,想到前面尝试过设置 HTTP_PROXY,用下面的指令清除,HTTPS_PROXY 存在的话也要清除 HTTPS_PROXY。
unset HTTP_PROXY
unset HTTPS_PROXY
然后repo init成功。。。,
如果遇到报错:fatal: '../platform/abi/cpp.git' does not appear to be a git repository
在.repo目录下的manifest.xml里找到fetch属性,改成
fetch="git://Android.git.linaro.org/"
提示输入你的姓名 及 邮件地址,你想要使用Gerrit code-review 工具的话就要用你申请的 Google账户使用的邮件地址,没有的话去申请一个,不用花多少时间。
Your Name [XXXXXX]: XXXXXX
6. repo 信息下载后,用 “repo sync”命令将真正的Android代码同步到当前工作目录显示下载状态类似下面
如果repo 操作中遇到网络连接问题,可以通过修改hosts文件尝试解决。Windows在C:\WINDOWS\system32\drivers\etc目录下,Linux用户打开/etc/hosts文件,在文件的末尾添加下面2句:
74.125.31.82 www.googlesource.com.
74.125.31.82 android.googlesource.com
相关文章推荐
- repo教程以及repo下载android源码以及遇到的问题
- 32 位ubunt u下载编译android2.2源码的问题之一
- 下载android源码(git问题总结)
- Android4.04下载源码图解~解决公网IP不能直接访问问题
- Android源码下载遇到的问题
- 下载Android源码遇到的问题
- 如何在ubuntu10.04下载android4.0的源码(并解决以往无法下载android源码的问题)
- pandaboard----android源码下载问题
- Android4.04下载源码图解~解决公网IP不能直接访问问题
- android 源码下载问题1--学习curl命令
- Ubuntu12.04下载Android4.0.1源码全过程,附若干问题解决[转]
- 下载CyanogenMod(Android)源码遇到的“not a git repository”问题
- 解决下载android源码时遇到的问题
- Android音频实时传输与播放(四):源码下载(问题更新)
- android 源码下载过程中遇到的一些问题
- 下载Android源码出现的问题
- Android4.04下载源码图解~解决公网IP不能直接访问问题
- 下载Android源码过程中,遇到的各种问题
- 解决下载Android源码时遇到的问题