Build the Android compiling environment in Ubuntu10.04

Source: Internet
Author: User
The following uses the Ubuntu10.04 (64bit) system as an example: 1. Install JDK. 1 $ sudoapt-getinstallsun-java5-jdk Note: if the sun-java-jdk package cannot be found by executing the above command, add the following source to the file/etc/apt/sources. list. {Debhttp: // cz.archive.ubuntu.com/ubuntuhardy-updatesma

The following uses Ubuntu 10.04 (64bit) as an example:

1. Install JDK.
1 $ sudo apt-get install sun-java5-jdk
Note: If you cannot find the sun-java-jdk package by running the preceding command, add the following source to the file/etc/apt/sources. list.
{{

Deb http://cz.archive.ubuntu.com/ubuntu hard-updates main multiverse
} Run: $ sudo apt-get update to update the source and then execute the above command.
2. Add Environment Variables
 
Add the following to/etc/environment:
CLASSPATH =/usr/lib/jvm/java-1.5.0-sun/bin
JAVA_HOME =/usr/lib/jvm/java-1.5.0-sun
Or

Add in file/etc/profile
JAVA_HOME =/usr/lib/jvm/java-1.5.0-sun
Export CLASSPATH =.: $ JAVA_HOME/lib: $ CLASSPATH
Export PATH = $ JAVA_HOME/bin: $ PATH
If CLASSPATH and JAVA_HOME are already set, modify them to the preceding format and save and exit. Www.linuxidc.com

Ii. Install the packages required for the compiling environment:
$ Sudo apt-get install git-core gnupg flex bison gperf build-essential zip curl sun-java5-jdk zlib1g-dev gcc-multilib g ++-multilib libc6-dev-i386 lib32ncurses5-dev ia32-libs x11proto-core-dev libx11-dev lib32readline5-dev lib32z-dev

3. Set the system's default jdk to 1.5:
$ Sudo update-java-alternatives-s java-1.5.0-sun

4. If Ubuntu does not have an X11 library, run the following command:
$ Sudo ln-s/usr/lib32/libX11.so. 6/usr/lib32/libX11.so

5. Ubuntu uses dash by default, but the dash function is weak, so change it to bash. Run the following command:
$ Sudo ln-snf/bin/bash/bin/sh

This is a success.

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.