首先参考 http://www.linuxidc.com/Linux/2014-03/97760.htmUbuntu 13.04下载Android 4.0.1源码过程 http://www.linuxidc.com/Linux/2013-07/87028.htm我遇到的困难有一些就在这里解决了。大家可以参看此前使用XP下硬盘安装的Ubuntu 在下载Android 4.0源码的过程中Ubuntu崩溃,登陆循环 无法解决 故从U盘安装纯Ubuntu。U盘启动安装Ubuntu 13.04 http://www.linuxidc.com/Linux/2013-04/83525.htm硬盘安装Ubuntu参考 http://www.linuxidc.com/Linux/2013-10/91565.htmUbuntu 就自己安装 不建议使用虚拟机。建议单一系统安装。下载源码:首先安装gitsudo apt-get install git-core然后在HOME 目录下创个文件夹BIN 用来存放 repomkdir bincd bincurl http://git-repo.googlecode.com/files/repo-1.12> ~/bin/repo对repo添加权限chmod a+x repo添加环境PATH=$PATH:~/bin创建一个文件夹存放源码mkdir ~/workAndroidcd ~/workAndroid后面这个步骤比较重要用浏览器登录https://android.googlesource.com/new-password,并用gmail帐号登录; 点击网页上的“允许访问”,得到类似的结果:machine android.googlesource.com login git-<userName>.gmail.com password <password> machine android-review.googlesource.com login git-<userName>.gmail.com password <password> 将上边的两行追加到~/.netrc文件结尾。(如果你的linux系统中从来没有建立过此文件,就在home目录下建立.netrc文件,将上面的信息加到新建的文件中去), 下载地址的URI更改为https://android.googlesource.com/a/platform/manifest。因为访问基本是匿名的,为了防止连接过多,对同一IP地址的连接数做了一定的限制。用gmail帐号进行认证。 在公司网络内或者用虚拟机下载的话,会经常遇到这问题。repo init -u https://android.googlesource.com/platform/manifest -b android-4.0.3_r1如果出现fatal: unable to auto-detect email address那么就在终端输入你的邮箱git config --global user.email "you@example.com"git config --global user.name "Your Name"就像这样现在你的初始化已经成功了。在 repo sync之前 我建议做这一步打开.repo/manifest.xml。找到下面一段:<remote name="aosp" fetch=".." />修改成<remote name="aosp" fetch="git://Android.git.linaro.org/"/>相信我 做了这个步骤下载起来飞快 再也不会乱报错了如果提示这个地址没有链接 可以尝试使用这个:<remote name="aosp" fetch="https://android.googlesource.com/" />OK 找个好时间 开始repo sync吧付上一个我正在下载的图共勉编译请看这里Ubuntu 13.04编译Android 4.0
Android源代码下载及编译开发Ubuntu 12.04下安装SUMO(Simulation of Urban MObility)相关资讯 编译Android
- Ubuntu编译Android整个系统以及编 (03/12/2014 08:21:16)
- Android开发实践:用脚本编译 (03/03/2014 09:25:45)
| - Ubuntu 12.10编译Android 4.0.3的 (03/04/2014 12:56:43)
- Ubuntu 上编译Android出现cannot (02/27/2014 17:01:34)
|
本文评论 查看全部评论 (0)