Configuration of Android compiling environment in Ubuntu

Source: Internet
Author: User
From operating system installation to program compilation, the process is roughly as follows. 1. UbuntuLinux operating system installation package. Use Ubuntu10.4Desktop to install Linux on the vmwarevm. 2. Complete Linux installation, set the root password $ sudopasswdroot3. Install SSH $ sudoapt-getinstallssh4 on Linux Desktop. Prepare the installation environment-by default, you

From operating system installation to program compilation, the process is roughly as follows.

1. install the software package in Ubuntu Linux.
Use the Ubuntu 10.4 Desktop system.
Install Linux on the vmwarevm.

2. Complete Linux installation and set the root password
$ Sudo passwd root

3. SSH installed on Linux Desktop
$ Sudo apt-get install ssh

4. Prepare the installation environment
-By default, you must install the following software packages.
$ Sudo apt-get install flex bison gperf libsdl-dev libesd0-dev libwxgtk2.6-dev build-essential zip curl
$ Sudo apt-get install valgrind
-Phython 2.4 or later.
Ubuntu10.4 contains Phython 2.5 by default. skip this step.
-JDK 6.0 or later.
Follow these steps to install JDK.
$ Sudo vim/etc/apt/sources. list. d/partner. list
Add the deb http://archive.canonical.com/lucid partner to the partner. list file.
$ Sudo apt-get install sun-java6-bin sun-java6-jre sun-java6-jdk
-Git 1.5.4 or later, Repo.
$ Cd
$ Mkdir bin
In ~ /. Add the environment variable to bashrc.
$ Vi ~ /. Bashrc
Export LANG = c
Export PATH = $ HOME/bin: $ PATH :.
Export JAVA_HOME =/usr/lib/jvm/java-6-sun-1.6.0.07 # Set this parameter based on actual conditions.
Export Android_JAVA_HOME = $ JAVA_HOME
Save and exit. Open a terminal window to make the environment variable take effect.
$ Sudo apt-get install git-core gnupg
$ Curl http://android.git.kernel.org/repo> ~ /Bin/repo
$ Chmod a + x ~ /Bin/repo
$ Mkdir android
$ Cd android
$ Repo init-u git: // android.git.kernel.org/platform/manifest.git
After running, the repo initialized in $ HOME/android information is displayed, and the environment settings are complete.

5. Download Android code
Run the following command:
$ Repo sync
It may be suspended for several times.

6. Compile Android
$ Make
Zlib. h error and-lncurses error may occur during this process.
Then set the zlibb1g-dev by running the following command
$ Sudo apt-get install zlib1g-dev
$ Sudo apt-get install libncurses5-dev

7. Confirmation result
The output file is the compilation result.
$ Cd out
You can see the compiled file.

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.