Full Process notes for compiling Android in Ubuntu10.04

Source: Internet
Author: User
To build an Android Development Environment (Android is not a common Android Application) in Linux, first ensure that the JDK version of the machine is 1.5. Currently, Android does not support JDK 1.6. 1. Because the JDK1.5 installation package cannot be found in the source provided by Ubuntu10.04, the first step is to add two software sources. Debhttp: // tw.archive.ubuntu.com/ubuntu/jauntym

To build an Android Development Environment (Android is not a common Android Application) in Linux, first ensure that the JDK version of the machine is 1.5. Currently, Android does not support JDK 1.6.

1. The JDK 10.04 installation package cannot be found in the source of Ubuntu. Therefore, the first step is to add two software sources.

Deb http://tw.archive.ubuntu.com/ubuntu/ jaunty main restricted universe multiverse
The deb-src http://tw.archive.ubuntu.com/ubuntu/ jaunty main restricted universe multiverse

The procedure is as follows:

On the command line, enter:
$ Sudo gedit/etc/apt/sources. list

Add the above source at the end of the opened file. Save the file.


2. Install JDK1.5. Run the following command:

$ Sudo apt-get install sun-java5-jdk

3. Install this development kit. The command is as follows:

$ Sudo apt-get install git-core gnupg valgrind flex bison gperf libsdl-dev libesd0-dev libwxgtk2.6-dev build-essential zip curl libncurses5-dev zlib1g-dev

4. Install repo:

$ Curl http://android.git.kernel.org/repo/bin/repo
$ Chmod a + x/bin/repo

5. Create the source file directory and initialize the git environment:

$ Mkdir working-directory-name (for example, android)
$ Cd working-directory-name
$ Repo init-u git: // android.git.kernel.org/platform/manifest.git

6. Synchronize the source code of the Main Line (it may take a long time depending on the network speed. We recommend that you execute it before going to bed ):

$ Repo sync

7. Compile the source code (about 2 hours ):

$ Make

8. Import the Eclipse project:

First, run the following command in the root directory of the android source file to move the eclipse project configuration file to the root directory. Www.linuxidc.com and set it to writable.

$ Cp development/ide/eclipse/. classpath
$ Chmod u + w. classpath

Create a Java project in eclipse, select "Create project from existing source", and select the root directory of the android source file. Click Finish. (This process may take several minutes and will be compiled after eclipse is imported)

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.