ubuntu下编译android代码
2012-11-16 14:55
423 查看
Installing the JDK
The Sun JDK is no longer in Ubuntu's main package repository. In order to download it, you need to add the appropriate repository and indicate to the system which JDK should be used.Java 6: for Gingerbread and newer
$ sudo add-apt-repository "deb http://archive.canonical.com/ lucid partner" $ sudo apt-get update $ sudo apt-get install sun-java6-jdk
Installing required packages (Ubuntu 10.04 -- 11.10)
You will need a 64-bit version of Ubuntu. Ubuntu 10.04 is recommended.Building using a newer version of Ubuntu is currently only experimentallysupported and is not guaranteed to work on branches other than master.$ sudo apt-get install git-core 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
Setting up ccache
You can optionally tell the build to use the ccache compilation tool.Ccache acts as a compiler cache that can be used to speed-up rebuilds.This works very well if you do "make clean" often, or if you frequentlyswitch between different build products.Put the following in your .bashrc or equivalent.
export USE_CCACHE=1
The suggested cache size is 50-100GB.You will need to run the following command once you have downloadedthe source code:
prebuilts/misc/linux-x86/ccache/ccache -M 50G
相关文章推荐
- 在Ubuntu下获取Android4.0源代码并编译
- 基于Ubuntu 14.04 LTS编译Android4.4.2源代码
- Ubuntu 14.04 LTS编译Android4.4源代码以及运行emulator虚拟机
- Ubuntu 14.04 64位编译Android4.2.2源代码
- Android:Ubuntu 16.04上编译Android主线最新代码
- 在ubuntu-12.04.3下搭建编译android4.4源代码-编译源码部分问题及sdk编译
- 基于Ubuntu 14.04 LTS编译Android4.4.2源代码
- 基于Ubuntu 14.04 LTS编译Android4.4.2源代码
- 在Ubuntu下获取Android4.0源代码并编译
- 基于Ubuntu 14.04 LTS编译Android4.4.2源代码
- Ubuntu10.04下载并编译Android4.3源代码
- 基于Ubuntu 14.04 LTS编译Android4.4.2源代码
- 64位Ubuntu 10.10编译Android 2.3.1源代码
- ubuntu 12.04(gcc降级)编译android代码遇到"_FORTIFY_SOURCE"的解决方法
- 使用ubuntu17.04编译Android 6.0源代码
- Android:Ubuntu 16.04上编译Android主线最新代码