Ubuntu Install & Configure Android SDK - aaccurso/CostSplitter GitHub Wiki

Table of Contents

  • Install Java JDK
  • Install Android SDK
  • Install ANT
  • Configure PATH

IMPORTANT Ubuntu 64-bit

If you are running a 64-bit distribution on your development machine, you need to install the ia32-libs package:

sudo dpkg --add-architecture i386 && 
sudo apt-get update &&
sudo apt-get install ia32-libs

This may take several minutes.

Install Java

sudo apt-get install openjdk-7-jdk

This is usually installed under /usr/lib/jvm/ but you can verify it executing which java

Install Android SDK

Go to Android SDK Download page: https://developer.android.com/sdk/index.html#download Get the link according to your SO architecture. Download the .zip and extract it in ~/Development:

wget <link>.zip ~/Development &&
unzip ~/Development/<Android_SDK>.zip

Install ANT

Go to ANT Apache Download page: https://ant.apache.org/bindownload.cgi Get the appropriate link, e.g.: http://apache.xfree.com.ar//ant/binaries/apache-ant-1.9.3-bin.zip Download the .zip and extract it in ~/Development:

wget http://apache.xfree.com.ar//ant/binaries/apache-ant-1.9.3-bin.zip ~/Development &&
unzip ~/Development/apache-ant-1.9.3-bin.zip

Configure PATH

Edit .bashrc or your favorite shell config file and append the following lines (note that you should change the directory names when necessary):

export DEV_HOME="~/Development"
export JAVA_HOME="/usr/lib/jvm/java-1.7.0-openjdk-amd64"
export ANT_HOME="$DEV_HOME/apache-ant-1.9.3"
export ANDROID_HOME="$DEV_HOME/adt-bundle-linux-x86_64-20131030/sdk"
export PATH="$PATH:$ANT_HOME/bin:$JAVA_HOME/bin:$ANDROID_HOME/tools:$ANDROID_HOME/platform-tools"

Finally, verify that the 3 tools were installed correctly by issuing:

java -version
adb version
ant -version
⚠️ **GitHub.com Fallback** ⚠️