JDK and Android SDK Installation on Ubuntu


I’ve been developing Android application on Windows. But recently, I tried to create an environment in Linux (Ubuntu/Xubuntu). In this article, I will describe the installation of JDK and Android SDK that is required before installing IDE. (It is assumed that without the use of ADT Bundle, we install separately JDK/SDK and IDE.)

Installation of JDK

JDK is updated frequently. So I looked for package management. Then I found that Oracle Java (JDK) 6 / 7 / 8 Installer PPA : “WebUpd8” team provides PPA. This PPA downloads and run the Oracle installer.

Install as follows. Along the way, you are prompted to agree to Oracle license. Then agree.

In the last line, you are sure the installation was successful.
At the result, in my environment, the JDK is installed in /usr/lib/jvm/java-7-oracle.

Installation of Android SDK

Following Android SDK | Android Developers, I have installed the Android SDK.

  1. First, there is the following entry in SYSTEM REQUIREMENTS – Linux.

    64-bit distributions must be capable of running 32-bit applications.

    My Environment is 64bit-Xubuntu. So I installed ia32-libs. (It is not necessary for 32bit OS.)

  2. Next, from DOWNLOAD FOR OTHER PLATFORMS, download Linux 32 & 64-bit package. (Suppose /home/hoge/Downloads/android-sdk_r21.1-linux.tgz)
    * Currently, there is a package called ADT Bundle environment, including Eclipse. However, in this article, it is assumed that you install IDE separately.
  3. In the home directory, make appropriate directory (here, suppose “Development”), and extract files there.

  4. It is useful to make a path to “tools” directory. So add the following line in ~/.bashrc.

    In order to apply the path, do the following.

  5. Update the SDK. (Because SDK for all platform will be downloaded, it will take a lot of time.)

  6. Start the SDK Manager to check the results. (In my environment, the sources has not been downloaded. So I downloaded them.)

  7. For other commands for android, check with –help option.

After this, you can set up favorite IDE, such as IntelliJ or Eclipse, and start development.

[Reference Sites]

[Relative articles]