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)