Configure Android source to compile the environment in Ubuntu

Source: Internet
Author: User

The Android source compilation environment can be configured in Ubuntu, it is recommended to use the latest 64-bit Ubuntu LTS (Long time Support);

1. Install the JDK. AOSP Main Branch code needs JAVA7, OpenJDK can be used on Ubuntu.

To install the JAVA7 command:

$ sudo apt-get update$ sudo apt-get install OPENJDK-7-JDK

If you have a Java environment installed on your system, you can update it:

$ sudo update-alternatives--config java$ sudo update-alternatives--config javac

If it is an older version of Android source, you can download and install the corresponding Java JDK;

Java6:kitkat

Java5:froyo

2. Install the required packages for compilation

Ubuntu14.04 64-bit (recommended)

$ sudo apt-get install bison g++-multilib git gperf libxml2-utils make python-networkx zlib1g-dev:i386 zip

Ubuntu12.04 64 bits (12.04 does not support the latest version of compilation)

$ sudo apt-get install git gnupg Flex Bison gperf build-essential   Zip curl Libc6-dev libncurses5-dev:i386 x11 proto-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

For more information, please refer to: Google official documentation

Configure Android source to compile the environment in Ubuntu

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.