1. JDK Installation
A. Preparation
Because as (Android Studio) does not support OPENJDK, the Oracle JDK needs to be downloaded separately, and the official website points out that for 64-bit Linux systems, in order to be able to run 32-bit programs on it, you need to install some software to execute the following command
Ubuntu 13.10 and above systems
#sudo dpkg--add-architecture i386
#sudo apt-get Update
#sudo apt-get Install libncurses5:i386 libstdc++6:i386 zlib1g:i386
Ubuntu 13.04 and below systems
#apt-get Install Ia32-libs
B. Installing the JDK
#sudo mkdir/usr/lib/jvm/
#sudo TAR-ZXVF jdk-8u51-linux-x64.tar.gz-c/USR/LIB/JVM
C. Configuring Environment variables
Edit/etc/profile the words is to all users of the system to do the environment configuration, not recommended to do so, but directly configure the current user
#sudo gedit ~/.BASHRC
Add the following content to the file
Export java_home=/usr/lib/jvm/jdk1.7.0_45
Export JRE_HOME=${JAVA_HOME}/JRE
Export Classpath=.:${java_home}/lib:${jre_home}/lib: $CLASSPATH
Export Path=${java_home}/bin: $PATH
Then make the changes effective
#source ~/.BASHRC
In the terminal input java-version test is configured successfully
Note: In the early Ubuntu version (at least my 15.04 does not appear) The OPENJDK will be installed by default, and you will need to execute the following command to configure the default JDK
#sudo update-alternatives --install /usr/bin/java java /usr/lib/jvm/jdk7/bin/java 300
#sudo update-alternatives --install /usr/bin/javac javac /usr/lib/jvm/jdk7/bin/javac 300
#sudo update-alternatives --config java
2. Android Studio Installation
Unpacking Packages
#unzip android-studio-ide-141.1980579-linux.zip-d/usr
Enter Android-studio/bin, launch Android Studio
#./studio.sh
Android Environment built under Ubuntu