1 / 19
文档名称:

android编译大全 完全指南.pdf

格式:pdf   页数:19页
下载后只包含 1 个 PDF 格式的文档,没有任何的图纸或源代码,查看文件列表

如果您已付费下载过本站文档,您可以点这里二次下载

分享

预览

android编译大全 完全指南.pdf

上传人:wxbdoc4 2013/7/19 文件大小:0 KB

下载得到文件列表

android编译大全 完全指南.pdf

相关文档

文档介绍

文档介绍:Android 编译大全
Android 编译大全(一)
1. 编译前的准备
. 编译环境准备
v 先构建一个 Ubuntu
v 在虚拟机中确认下面的包是否已经安装:
n sudo apt-get install build-essential
n sudo apt-get install make
n sudo apt-get install gcc
n sudo apt-get install g++
n sudo apt-get install libc6-dev
n sudo apt-get install flex
n sudo apt-get install bison
n sudo apt-get install patch
n sudo apt-get install texinfo
n sudo apt-get install libncurses-dev
n sudo apt-get install git-core gnupg //(gnupg 系统可能已自带)
n sudo apt-get install flex bison gperf libsdl-dev libesd0-dev -dev build-
essential zip curl
n sudo apt-get install ncurses-dev
n sudo apt-get install zlib1g-dev
n sudo apt-get install valgrind
n sudo apt-get install (Ubuntu 可能已经自带)
n sudo apt-get install sun-java5-jdk ( 里面已经用 ,需要重新下载一
)
v 下载 repo 脚本,加上可执行权。
n $ curl ./repo > repo
n $ sudo chmod a+x repo
注:本文档以 Froyo 版本为基础进行编译。
. Source code 的获取
v 在源码存放目录 android 中执行
$ repo init -u git:///platform/ -b
-m
就可以获得代码了
关于-b 和-m 参数的说明参见:
https://i/QAEP
v 执行 repo sync 就可以开始下载源码了
$ repo sync
(漫长的过程,视速度而言需要半天以上)
Android 编译大全(二)
2. 编译源代码
v 执行 ls -la /bin/sh 命令,如果输出如下:
rwxrwxrwx 1 root root 4 2010-02-10 17:14 /bin/sh -> dash
请执行$sudo dpkg-reconfigure dash 命令修改 sh 版本,并选择“否”;
此处如果不改好的话,编译时会出现错误。
v 执行 source build/ 命令
v 执行 bo 命令,出现选择对话框
u Build for the simulator or the device?
u 1. Device
u 2. Simulator
u
u Which would you like? [1]
u
u Build type choices are:
u 1. release
u 2. debug
u
u Which would you like? [2]
u
u Product choices are:
u 1. core
u 2. full_dream
u 3. full
u 4. full_passion
u 5. full_sapphire
u 6. generic_dream
u 7. generic
u 8. generic_passion
u 9. generic_sapphire
u 10. msm7625_qrd
u 11. msm7627_ffa
u 12. msm7627_surf
u 13. msm7630_surf
u 14. qsd8250_ffa
u 15. qsd8250_surf
u 16. sample_addon
u 17. sdk
u 18. sim
u You can also type the name of a product if you