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.
sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update
sudo apt-get install oracle-java7-installer
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.
- 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.)1sudo apt-get install ia32-libs
- 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.
- In the home directory, make appropriate directory (here, suppose “Development”), and extract files there.
1234cd ~mkdir Developmentcd Developmenttar zxf /home/hoge/Downloads/android-sdk_r21.1-linux.tgz
- 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.1source ~/.bashrc
- Update the SDK. (Because SDK for all platform will be downloaded, it will take a lot of time.)
1android update sdk --no-ui
- Start the SDK Manager to check the results. (In my environment, the sources has not been downloaded. So I downloaded them.)
- 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.
- Migrating Android Dev’s IDE from Eclipse to IntelliJ(1) | DeVlog
- Migrating Android Dev’s IDE from Eclipse to IntelliJ(2) | DeVlog