Compile android code in ubuntu

Source: Internet
Author: User

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 shoshould 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. www.2cto.com

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:

Pre-builts/misc/linux-x86/ccache-M 50G

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.