The second chapter mainly introduces the building of Android development environment, mainly including Android application development ring Android NDK development Environment and cross-compilation environment. The following tools are required to develop, test, and debug Linux drivers and HAL programs:
JDK6 or above version;
Eclipse3.4 or above version;
ADT (for developing Android apps);
CDT (for the development of the Android NDK program);
Android SDK;
Android NDK;
Cross-compiling environment;
Linux kernel source code;
Android source code;
Serial tool for debugging the Development Board: Minicom.
When installing the JDK, first download the JDK online.
Http://www.oracle.com/technetwork/java/javase/downloads/index.html
After decompression, enter the following command in the Linux terminal to open the profile file setting path environment variable.
#gedit/etc/profile
After opening the profile file, enter the following at the end of the file.
Export path=.:/ Developer/jdk6/bin: $PATH
After you save the profile file, you can reload the profile by entering any of the following two commands in the Linux terminal.
Ubuntu Linux provides an easier way to install the JDK and perform the following commands on the Linux terminal to automatically JDK6
#add-apt-repository "Deb Http://archive.canonical.com/lucid partner"
#add-get Update
#apt-get Install SUN-JAVA6-JDK
After executing the above program, you do not need to configure the PATH environment variable again.
There are several steps to building an Android application development environment:
Install the Android SDK;
installation of ADT;
Configure ADT;.
Create an AVD.
Next, install the Android NDK development environment and install the cross-compilation environment.
The configuration process under Windows and Mac OS x systems is similar to the Linux environment.
Read "Android Deep Exploration (Volume 1) HAL and drive Development" some thoughts 2