Ubuntu14.04 build the Android5.1 development environment and compile

Source: Internet
Author: User
1. Install Ubuntu. Download Ubuntu from Ubuntu 10.04-ubuntu15.04 on the official website. You can download the desktop and server versions as needed. Generally, you are advised to install the desktop version on virtual machines for ease of management, my computer is 64-bit, so the download of the ubuntu-14.04.2-server-amd64.iso to install ubuntu system, in fact, very simple, there are also a lot of views on the Internet tutorial, with U disk installation needs to note

1. Install Ubuntu14.04

Download the Ubuntu system from Ubuntu 10.04-Ubuntu 15.04. You can download the desktop and server versions as needed.

General Virtual Machine recommended installation desktop version, convenient management, my computer is 64-bit, so download the ubuntu-14.04.2-server-amd64.iso

Prepare a USB flash drive and start it through the USB flash drive. The remaining steps are the same as those for VMware Workstation installation.

Windows 7 hard drive installation Ubuntu 14.10 graphic tutorial http://www.linuxidc.com/Linux/2014-10/108430.htm

2. Install related packages required for Android5.1 environment Compilation

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 lib32z-dev g ++-multilib mingw32 tofrodos python-markdown libgl1-mesa-dev unzip tproc libxml2-utils

3. Install openJDK

Sudo apt-get install default-jre

Sudo apt-get install default-jdk

By default, it is installed in usr/lib/jvm. If the installation is successful, you can view it using java-version. To set it to the default one, perform the following steps:

Sudo update-alternatives -- install/usr/bin/java/usr/lib/jvm/java-1.7.0-openjdk-amd64/bin/java 300
Sudo update-alternatives -- install/usr/bin/javac/usr/lib/jvm/java-1.7.0-openjdk-amd64/bin/javac 300
Sudo update-alternatives -- config java

Set environment variables (global)

Sudo gedit/etc/profile

Export JAVA_HOME =/usr/lib/jvm/java-1.7.0-openjdk-amd64
Export CLASSPATH = ".: $ JAVA_HOME/lib: $ CLASSPATH"
Export PATH = "$ JAVA_HOME/bin: $ PATH"

Sudo gedit/etc/environment add the corresponding path

4. decompress the kernel and android packages.

Extract the kernel package: tar-zxvf unzip {mer_project1__kernel.tar.gz

Decompress the android package:

ALPS.L1.MP8.V1_ELINK8163_TB_L1_INHOUSE.tar.gz 00

ALPS.L1.MP8.V1_ELINK8163_TB_L1_INHOUSE.tar.gz 01 ....

ALPS.L1.MP8.V1_ELINK8163_TB_L1_INHOUSE.tar.gz 08

You can decompress the package:

Cat export {mer_project1__inhouse.tar.gz * | tar zxvf-

Or first compress the above gz00-gz01 into a package: the terminal runs the command below

Cat (Space)

ALPS.L1.MP8.V1_ELINK8163_TB_L1_INHOUSE.tar.gz 00 (Space)

ALPS.L1.MP8.V1_ELINK8163_TB_L1_INHOUSE.tar.gz 01 (Space)

...

ALPS.L1.MP8.V1_ELINK8163_TB_L1_INHOUSE.tar.gz 08 (Space)

> ALPS.L1.MP8.V1_ELINK8163_TB_L1_INHOUSE.tar.gz

In this example, a compressed package alps.l1.mp8.v1_elink8163_tb_l1_inhouse.tar.gz is added, and the tar-zxvf command is used to decompress the package.

5. Compile android

Compile command:

Source build/envsetup. sh

Lunch

Make-j16 2> & 1 | tee build. log

Ubuntu 14.04 build Android Development Environment http://www.linuxidc.com/Linux/2014-05/101149.htm

 

Ubuntu 14.04 x64 method http://www.linuxidc.com/Linux/2014-05/101148.htm for configuring the Android 4.4 kitkat compiling environment

 

Ubuntu 12.04 build Android Development Environment http://www.linuxidc.com/Linux/2012-09/69961.htm

 

Ubuntu 14.04 configure Android SDK Development Environment http://www.linuxidc.com/Linux/2014-05/101039.htm

 

64-bit Ubuntu 11.10 Android Development Environment (JDK + Eclipse + ADT + Android SDK in detail) http://www.linuxidc.com/Linux/2013-06/85303.htm

 

Ubuntu 12.10x64 install Android SDK http://www.linuxidc.com/Linux/2013-03/82005.htm

 

For more information about Android, see Android topics page http://www.linuxidc.com/topicnews.aspx? Tid = 11

For more information about Ubuntu, see Ubuntu special page http://www.linuxidc.com/topicnews.aspx? Tid = 2

This article permanently updates the link address: Http://www.linuxidc.com/Linux/2015-07/119759.htm

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.