Install JDK and Androidstudio under Ubuntu system

Source: Internet
Author: User

Yesterday at home tossing a day, put a computer installed an Ubuntu system, and successfully fix JDK and Androidstudio installation, can be new project directly run, not before touched Ubuntu, a day down reluctantly to a small part of the basic operation of Ubuntu understand, Write down a note:

1, Download the JDK package for Linux Environment from HTTP://WWW.LINUXIDC.COM/LINUX/2015-01/112030.HTM1: jdk-8u45-linux-x64.gz, Copy to the downloads file in Linux

2, first create a new JVM file mkdir JVM under the Usr/lib folder under Computer
3, Unzip jdk-8u45-linux-x64.gz package: CD downloads switch to downloads file, execute command decompression tar-zxvf jdk-8u45-linux-x64.gz Get the folder jdk1.8.0_45 file. 4, move the jdk1.8.0_45 file to the JVM folder with sudo mv JDK1.8.0_45/USR/LIB/JVM and configure the environment variable:Set Environment variables:
$ sudo gedit/etc/profile
Append at end of document:
Export java_home=/usr/lib/jvm/jdk1.8.0_45
Export path= $JAVA _home/bin: $JAVA _home/jre/bin: $PATH
Export classpath= $CLASSPATH:.: $JAVA _home/lib: $JAVA _home/jre/lib

Modify the system default Java to:
$ sudo update-alternatives--install/usr/bin/java java/usr/lib/jvm/jdk1.8.0_45/bin/java
$ sudo update-alternatives--install/usr/bin/javac javac/usr/lib/jvm/jdk1.8.0_45/bin/ Javac
$ sudo update-alternatives--config java
$ sudo update-alternatives--config javac

Check, enter:
$ java-version
See if the installation is successful, and if successful, some information such as Java version will be displayed. -----------------------------------------------------------------------------------------Next Install Androidstudio1, first download Linux under the Androidstudio file, I was from the https://github.com/inferjay/AndroidDevTools (there are many useful tools for Android development) downloaded to the Baidu cloud disk, Then directly downloaded to the computer, the file is Android-studio-ide-141.1890965-linux.zip, directly copied to the Ubuntu system under the Downloads folder,2, go to (CD Downloads) Downloads file to the next, with unzip Android-studio-ide-141.1890965-linux.zip extract the file to get Android-studio package, and then in the terminal with command MV Android-studio/opt Move the file to the OPT folder under computer. 3,in the command-line window, execute:cd/opt/android-studio/bin/into the Androidstudio installation directory, run: sudo./studio.sh can start the installation directly, so easy!
3, of course, the process is not so simple, because we androidstudio download the SDK when you may encounter problems, to turn the wall! Find a lot of information on the Internet, finally found a solution, today told the next two colleagues, they tried, also no problem. is in the Androidstudio process, download the SDK to a moment will stop, because the download is not, at this time Open terminal command line execution:sudo apt-get install lib32z1 lib32ncurses5 lib32bz2-1.0 Lib32stdc++6, and then re-download it.  

Install JDK and Androidstudio under Ubuntu system

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.