Linux/Ubuntu 11.10 How to build Android4.0.3 development environment

  

We all know that Android software is developed based on Linux system, so we need to build development environment under Linux system, then how to use Linux/Ubuntu11.10 system Building Android4.0.3 development environment? The following small series gives you a detailed introduction to the construction steps of the Android4.0.3 development environment.

a, JDK installation, the following steps:

1, the copy jdk-7u4-linux-i586.tar to get /home under linux /yan /download directory, create A directory /home/yan/android. So android-related are installed to the /home/yan/android directory, all source installation files are placed under download. Switch to root and enter the command in the download directory: tar -zxvf jdk-7u4-linux-i586.tar -C . . /android, extract it to the android directory.

2, configure environment variables, need to modify /etc/profile file under Linux, use gedit /etc/profile

At the end of this file, enter:

export JAVA_HOME =/home/yan/android/jdk1.7.0_04

export PATH=$PATH:$JAVA_HOME/bin

After saving, type: source /etc/profile to take effect. Input: java -version

Verify that the java environment is configured.

Second, install AndroidSDK

1, copy android-sdk_r18-linux to the download folder, enter the download then: tar -zxvf android-sdk_r18-linux.tgz -C. . /android/Decompress.

Next cd /home/yan/android/android-sdk-linux/tools, then run:. /android, this is used to start the android sdk manager, which means that this thing is used to download the real android development kit. When running, it will appear:

(java:2925): Gtk-WARNING **: The theme engine cannot be found in the module path: <;pixmap”,

(java:2925) : Gtk-WARNING **: Unable to find theme engine in module path: <quo;pixmap”,

(java:2925): Gtk-WARNING **: Unable to find theme engine in module path:“ Pixmap”,

(java:2925): Gtk-WARNING **: Unable to find the theme engine in the module path: “pixmap”,

This warning, this is the gtk version too Caused by low.

Close android sdk manager first, terminal input: sudo apt-get install gtk2-engines-pixbuf Upgrade gtk.

2, after the upgrade is complete, open the android sdk manager again, this is online installation, must ensure network. Inside api8 corresponds to android2.2 version, api13 corresponds to android3.2 version, api10 corresponds to android2.3.3 version. These are all classic android versions. The top thing api15 corresponds to the android4.0.3 version, this is the latest. The default has been given to us. Here we choose the first four. The top four tick and then ok. It will be downloaded automatically. After the download is complete, you will be prompted to restart the android sdk manager

3. Install eclipse

1. Copy eclipse-jee-indigo-SR2-linux-gtk.tar to download, then extract it to Under android. No longer repeated. (The linux version of eclipse download address is http://www.eclipse.org/downloads/?osType=linux, here is the first javaEE version, for this selection, online said this is good. It seems that there is also a second Eclipse classic 4.2).

Unzip command: tar -zxvf eclipse-jee-indigo-SR2-linux-gtk.tar.gz -C . . /android/

2, go to the android/eclipse directory, enter the command. /eclipse view installed successfully.

Fourth, install ADT and (NDK)

1, in the android sdk download address in google, find ADT-18.0.0, this is the version corresponding to android sdk4.0.3 Is a zip file. Copy to the download folder.

2, open eclipse, point help--install new software, point add--archive, here is the offline installation method, you can also install online. Offline installation will be faster. Click select all, then click next to install. After you click it, a prompt box for Installing software will appear, showing the progress. After the installation is complete, you will be prompted to restart.

Note: adt is the meaning of android develop tool, to achieve communication between eclipse and android sdk bridge, so must be installed.

3, set android sdk location, that is to tell eclipse android sdk somewhere. After rebooting, you will be prompted: Welcome to android development, select the second; use eixsting SDKs, set the path.

The original version of adt18.0.0 is outdated. This is the version in April 2012. You need to install the latest one released in July.

In the workwith, enter: https://dl-ssl.google.com/android/eclipse/, he will automatically detect, there are DevelopTools listed, there are four ddms, adt, etc., in addition, One is that NDK-plugins will be used anyway, and it's a good one. NDK is a localization tool. It is a cross compiler that compiles local c/c++ code into a dynamic link library for java program calls. Of course, the program must satisfy the JNI interface.

Tips can not install ndk, ndk installation Need to install cdt plugin! In this step, you can only upgrade the adt. Upgrade from adt18.0.0 to 20.0.0.

Restart, open eclipse, point window-preferrence, point android, and make android sdk folder path. Click on new project to see if you can find the android application. . If you can, this step is successful.

V. Install CDT plugin

google cdt, enter the download link, download cdt8.0.0 version, follow the above installation ad method to install. The sign of successful installation is that you can create a new c/c++ project.

Six, NDK plug-in installation

google NDK download address, copy and copy to the download folder, and then directly decompress it. Export PATH=$PATH:/home/yan/android/android-ndk-r8, then source . . . .

The above is the introduction of Linux/Ubuntu 11.10 to build Android4.0.3 development environment. Before installing AndroidSDK, you need to install jdk first, then install and configure related software.

Copyright © Windows knowledge All Rights Reserved