Android Environment built under Ubuntu

Source: Internet
Author: User

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

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.