The Android development environment is built in two main steps: Installing the JDK and installing the integrated development environment.
First, install the JDK
Ubuntu system comes with OPENJDK, to develop Android or need to go to the official website download jdk (more than 1.6). The current system JDK version can be viewed through the java-version directive.
Download the latest Java SE development environment (JDK) to Oracle official website http://www.oracle.com/technetwork/java/javase/downloads/index.html What I'm downloading here is jdk-8u11-linux-x64. Copy the downloaded compressed package to the/home/kyo/java directory and unzip the directory/home/kyo/java/jdk1.8.0_11 (Kyo is my personal home directory name).
After obtaining the JDK, you can configure the environment variable, enter the command: sudo gedit/etc/environment, enter the following lines at the end of the file:
Export Java_home=/home/kyo/java/jdk1.8.0_11
Export JRE_HOME=/HOME/KYO/JAVA/JDK1.8.0_11/JRE
Export classpath=.: $CLASSPATH: $JAVA _home/lib: $JRE _home/lib
Input instruction: sudo gedit/etc/profile, enter the following lines at the end of the file (note before umask 022)
Export Java_home=/home/kyo/java/jdk1.8.0_11
Export JRE_HOME=/HOME/KYO/JAVA/JDK1.8.0_11/JRE
Export classpath=.: $CLASSPATH: $JAVA _home/lib: $JRE _home/lib
Export path= $PATH: $JAVA _home/bin: $JRE _home/bin: $HOME/bin
When entering java-version, you should see the following prompt:
Java Version "1.8.0_11"
Java (TM) SE Runtime Environment (build 1.8.0_11-b12)
Java HotSpot (TM) 64-bit Server VM (build 25.11-b03, Mixed mode)
At this point the environment variable configuration OK, you can write a simple Java program test.
Second, install the Android integrated development environment, where the eclipse development environment is used.