Ubuntu 14.04 Installing JDK and environment variables
JDK installation premise: Your computer is not installed OPENJDK, if installed, please first uninstall
1, official website download jdk:jdk-8u20-linux-x64.tar.gz
2, double-click jdk-8u20-linux-x64.tar.gz Extract files to the/home/ljk/javadevelop directory (you want to install the directory, note, under Ubuuntu, this file you unzip, it is equivalent to installed), One more Jdk1.8.0_20 folder after the extraction is complete
3, Ctrl+alt+t open the terminal, and then execute the command [sudo gedit/etc/profile], at the end of the profile press ENTER to separate a line, and then add the following lines
#set Java Environment
JAVA_HOME=/HOME/LJK/JAVADEVELOP/JDK1.8.0_20 (JDK installation path)
Export JRE_HOME=/HOME/GEEK/DEVELOPMENT/JDK1.8.0_20/JRE
Export classpath= $JAVA _home/lib: $JRE _home/lib: $CLASSPATH
Export path= $JAVA _home/bin: $JRE _home/bin: $PATH
(in addition, the online method is mostly two, one is in the file I said to add, and the other is in the/.BASHRC this file, use the command
sudo gedit ~/.BASHRC)
Save exit and then log off or restart the system
Re-enter the system, ctrl+alt+t open the terminal again, enter the command [Java-version] will display the Java version of the relevant information, the JDK installed successfully
Second, the installation of Android Studio
1. Download the android Studio installation package (http://developer.android.com/sdk/installing/studio.html) on the official website
2, double-click to extract the files to the directory you want to install, then the directory will be a Android-studio folder
3. Enter the bin directory under this directory (using command entry)
On the command line, enter sudo./studio.sh, open Android Studio
In addition, this is a 32-bit system, if you are 64-bit Ubuntu, you have to add a command, otherwise it will not run
Apt-get Install lib32ncurses5 ia32-libs (Note that this command may not run successfully, he will prompt you to have something replaced, but you have to type it out, because after typing, open Android again Studio will not be prompted for any errors such as JDK found)
Okay, now, try a new project.
After the first new project will be prompted to download Gradle, this is the first time Android studio opened the necessary link, time-consuming, slowly wait, anyway, I went out to run a step back, he will download the good.
T
Ubuntu 14.04 Install JDK8U20 and configure environment variables to install Android Studio