google官方提供的编译android源码的环境初始化,Initializing a Build Environment
原文网址:http://source.android.com/source/initializing.html
Initializing a Build Environment
IN THIS DOCUMENT
- Choosing a Branch
- Setting up a Linux build environment
- Installing the JDK
- Installing required packages (Ubuntu 14.04)
- Installing required packages (Ubuntu 12.04)
- Installing required packages (Ubuntu 10.04 -- 11.10)
- Configuring USB Access
- Setting up ccache
- Using a separate output directory
- Setting up a Mac OS build environment
- Creating a case-sensitive disk image
- Installing the JDK
- Master branch
- Branch 5.0.x and earlier branches
- Branch 4.4.x and earlier branches
- Branch 4.0.x and all earlier branches
- Next: Download the source
This section describes how to set up your local work environment to build the Android source files. You will need to use Linux or Mac OS. Building under Windows is not currently supported.
For an overview of the entire code-review and code-update process, see Life of a Patch.
Choosing a Branch
Some of the requirements for your build environment are determined by which version of the source code you plan to compile. See Build Numbers for a full listing of branches you may choose from. You may also choose to download and build the latest source code (called "master"), in which case you will simply omit the branch specification when you initialize the repository.
Once you have selected a branch, follow the appropriate instructions below to set up your build environment.
Setting up a Linux build environment
These instructions apply to all branches, including master.
The Android build is routinely tested in house on recent versions of Ubuntu LTS (14.04), but most distributions should have the required build tools available. Reports of successes or failures on other distributions are welcome.
For Gingerbread (2.3.x) and newer versions, including the master branch, a 64-bit environment is required. Older versions can be compiled on 32-bit systems.
Note: See the Downloading and Building page for the list of hardware and software requirements. Then follow the detailed instructions for Ubuntu and Mac OS below.
Installing the JDK
The master branch of Android in the Android Open Source Project (AOSP) requires Java 7. On Ubuntu, useOpenJDK.
Java 7: For the latest version of Android
$ sudo apt-get update
$ sudo apt-get install openjdk-7-jdk
Optionally, update the default Java version by running:
$ sudo update-alternatives --config java
$ sudo update-alternatives --config javac
If you encounter version errors for Java, set its path as described in the Wrong Java Version section.
To develop older versions of Android, download and install the corresponding version of the Java JDK:
Java 6: for Gingerbread through KitKat
Java 5: for Cupcake through Froyo
Note: The lunch
command in the build step will ensure that the Sun JDK is used instead of any previously installed JDK.
Installing required packages (Ubuntu 14.04)
You will need a 64-bit version of Ubuntu. Ubuntu 14.04 is recommended.
$ sudo apt-get install bison g++-multilib git gperf libxml2-utils
Installing required packages (Ubuntu 12.04)
You may use Ubuntu 12.04 to build older versions of Android. Version 12.04 is not supported on master or recent releases.
$ sudo apt-get install git gnupg flex bison gperf build-essential \
zip curl libc6-dev libncurses5-dev:i386 x11proto-core-dev \
libx11-dev:i386 libreadline6-dev:i386 libgl1-mesa-glx:i386 \
libgl1-mesa-dev g++-multilib mingw32 tofrodos \
python-markdown libxml2-utils xsltproc zlib1g-dev:i386
$ sudo ln -s /usr/lib/i386-linux-gnu/mesa/libGL.so.1 /usr/lib/i386-linux-gnu/libGL.so
Installing required packages (Ubuntu 10.04 -- 11.10)
Building on Ubuntu 10.04-11.10 is no longer supported, but may be useful for building older releases of AOSP.
$ sudo apt-get install git gnupg flex bison gperf build-essential \
zip curl zlib1g-dev libc6-dev lib32ncurses5-dev ia32-libs \
x11proto-core-dev libx11-dev lib32readline5-dev lib32z-dev \
libgl1-mesa-dev g++-multilib mingw32 tofrodos python-markdown \
libxml2-utils xsltproc
On Ubuntu 10.10:
$ sudo ln -s /usr/lib32/mesa/libGL.so.1 /usr/lib32/mesa/libGL.so
On Ubuntu 11.10:
$ sudo apt-get install libx11-dev:i386
google官方提供的编译android源码的环境初始化,Initializing a Build Environment的更多相关文章
- 深入浅出 - Android系统移植与平台开发(五)- 编译Android源码(转)
2.3编译Android源码 Android源码体积非常庞大,由Dalvik虚拟机.Linux内核.编译系统.框架代码.Android定制C库.测试套件.系统应用程序等部分组成,在编译Android源 ...
- 【转】在Ubuntu下编译Android源码并运行Emulator
原文网址:http://www.mcuos.com/thread-4553-1-1.html 建立编译环境 1.在VirtualBox上安装Ubuntu 2.安装JDK $ sudo apt-ge ...
- Ubuntu12.04编译Android4.0.1源码全过程-----附wubi安装ubuntu编译android源码硬盘空间不够的问题解决
昨晚在编译源码,make一段时间之后报错如下: # A fatal error has been detected by the Java Runtime Environment: # # SIGSE ...
- 在ubuntu16.04上编译android源码【转】
本文转载自:http://blog.csdn.net/fuchaosz/article/details/51487585 1 前言 经过3天奋战,终于在Ubuntu 16.04上把Android 6. ...
- 【转】Ubuntu10.04上编译Android源码(Build Android source in Ubuntu10.04 Platform)
原文网址:http://blog.csdn.net/chenyafei617/article/details/6570928 一.Introduction 今天我们就来谈谈如何在Ubuntu平台上面编 ...
- 将Android源码导入eclipse中的方法以及编译Android源码指定模块
本文博客地址:http://blog.csdn.net/qq1084283172/article/details/53365659 将android源码导入eclipse.androidstudio. ...
- 在Mac mini上编译Android源码
参考文章 1.Android 6.0 源代码编译实践 2.编译Android源码致命错误解决方案 实践过程 1.Mac下安装Ubuntu双系统 (1)Ubuntu版本:Ubuntu 15.10 注:实 ...
- [原]编译Android源码过程中遇到的问题
编译Android源码的过程参考Android官网介绍: 1.下载Android源码的步骤:https://source.android.com/source/downloading.html 2.编 ...
- 一次编译Android源码实验
注意,本文只供参考,是老文章 1.必要的软件环境 sudo apt-get install build-essential sudo apt-get install make sudo apt-get ...
随机推荐
- C++里的int 和string类型相互转换
C++不像Java和C#一样在进行数据类型转换时直接调用一些类方法就可以了,使用起来很简单. 一个很简单的例子就是string str=“D:\\”+1+“.txt”;这在Java或者C#里面是可以自 ...
- 重新开始学习c#啦,希望能坚持下去!
过了这么多年,还是感觉自己喜欢C#,喜欢编程,虽然自己什么技术也没有:做的项目也不算是项目:
- 过滤部分错误信息,不输出到stderr
cmd 2>/tmp/stderr.log cat /tmp/stderr.log | grep -v “要过滤信息的关键字” >&2 rm /tmp/stderr.log
- DB2实用命令记录
quiesce tablespace quiesce tablespaces for table <table_name> share; Monitor Switches details ...
- Delphi IDE下载全地址
Delphi IDE下载全地址: http://pan.baidu.com/share/home?uk=1060104307#category/type=0 还是网友伟大呀.当然有钱的公司还是应该多多 ...
- centos系统python升级2.7.3
首先下载源tar包 可利用linux自带下载工具wget下载,如下所示: wget http://www.python.org/ftp/python/2.7.3/Python-2.7.3.tgz 下载 ...
- Python 的格式化字符串format函数
阅读mattkang在csdn中的博客<飘逸的python - 增强的格式化字符串format函数>所做笔记 自从python2.6开始,新增了一种格式化字符串的函数str.format( ...
- windows下常用快捷键
windows下常用快捷键: 显示桌面: win徽标+D 打开资源管理器: win徽标+E 打开任务管理器: Ctrl+Alt+delete 任务切换: Alt+Tab 应用程序中窗口之间的切换: C ...
- 基于Mahout的电影推荐系统
基于Mahout的电影推荐系统 1.Mahout 简介 Apache Mahout 是 Apache Software Foundation(ASF) 旗下的一个开源项目,提供一些可扩展的机器学习领域 ...
- css3 Transition动画执行时有可能会出现闪烁的bug
css3 Transition动画执行时有可能会出现闪烁的bug,一般出现在开始的时候. 解决方法: 1.-webkit-backface-visibility: hidden; 2.-webkit- ...