Android的源代码下载教程-android学习之旅(102)
2016-03-16 15:43
274 查看
一.环境准备
1.安装ubuntu系统,或者虚拟机。
2.安装java的sdk
3.安装依赖包 ,命令是:sudo apt-get install flex bison gperf libsdl-dev libesd0-dev libwxgtk2.6-dev build-essential zip curl
4.安装调试工具,命令是:sudo apt-get install valgrind
二.源码下载
1.首先下载 repo 工具。命令如下:
mkdir ~/bin PATH=~/bin:$PATH curl https://storage.googleapis.com/git-repo-downloads/repo > ~/bin/repo ## 如果上述 URL 不可访问,可以用下面的: ## curl https://storage-googleapis.lug.ustc.edu.cn/git-repo-downloads/repo > ~/bin/repo chmod a+x ~/bin/repo
2.然后建立一个工作目录(名字任意) ,命令是:
mkdir WORKING_DIRECTORY cd WORKING_DIRECTORY
3.初始化仓库,命令是:
!!!!!将 https://android.googlesource.com/platform/manifest 替换为 git://mirrors.ustc.edu.cn/aosp/platform/manifest。
repo init -u git://mirrors.ustc.edu.cn/aosp/platform/manifest ## 如果提示无法连接到 gerrit.googlesource.com,可以编辑 ~/bin/repo,把 REPO_URL 一行替换成下面的: ## REPO_URL = 'https://gerrit-googlesource.lug.ustc.edu.cn/git-repo'
如果需要某个特定的 Android 版本
Android版本列表repo init -u git://mirrors.ustc.edu.cn/aosp/platform/manifest -b android-4.0.1_r1
4.同步源码树(以后只需执行这条命令来同步):
repo sync
后面请静静的等待:上一张我下载android6.0.1的截图:
相关文章推荐
- Android的源代码下载教程-android学习之旅(102)
- android 中不同的Xml中id可以重名吗?
- Android 自定义属性
- mac os android ndk 配置环境变量设置笔记
- Android中的几种多线程实现
- Xamarin.Forms教程Android SDK工具下载安装
- Android开发之Service
- Android Drawable 那些不为人知的高效用法(转载)
- Android Native Crash 堆栈转换
- android view类 介绍
- Xamarin.Form的Android SDK工具下载安装
- android 开机动画
- ListView 中关于checkBox的复用出错问题,个人总结的
- android中跨进程debug
- 【Android】三种工厂模式简析
- android 自定义 ProgressBar (类似微博拍摄视频进度条)
- Android让一个service开机自动启动
- Android:Service完全解析(三)
- Android:Service完全解析(二)
- Android:Service完全解析(一)