Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

This question already has an answer here:

I have shifted to Ubuntu only few weeks ago and after setting up Ubuntu my first step was to setup Eclipse for android development. I do not have any knowledge of Linux. I have searched on google and on this website for a comprehensive guide. Most of the guides are for older versions of Ubuntu and most of the instructions are not working for me. As I am not very well-versed in linux so often I had to start over with clean copy of Ubuntu. I have found this guide that have ultimately made the android development worked for me.

Hopefully it will help other users too.

share|improve this question

marked as duplicate by precise, hbdgaf, Warren Hill, BryceAtNetwork23, LnxSlck Jul 30 at 16:00

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

4  
Thank you very much for sharing this, it is better to split it into 2 parts: a question and an answer. See About To understand the AskUbuntu model. Also askubuntu.com/help/self-answer –  Sneetsher May 11 at 16:11
    
To install the Android SDK with eclipse, first make sure you install openjdk-?-sdk and openjdk-?-jre (preferably the latest available) and you can download the package (32 or 64 bit) from: developer.android.com/sdk/index.html#download and this link shall guide you further with getting the bundle installed: developer.android.com/sdk/installing/index.html?pkg=adt. Also, check this askubuntu answer: askubuntu.com/a/466245/212123 –  precise Jul 25 at 5:45

1 Answer 1

The following are the steps in setting up android SDK on ubuntu 14.04:

# ++++++++++++++++++++++++++++++
# apt-get update and upgrade
# ++++++++++++++++++++++++++++++
sudo apt-get update
sudo apt-get upgrade

# ++++++++++++++++++++++++++++++
# For development
# ++++++++++++++++++++++++++++++
sudo apt-get install build-essential

# ++++++++++++++++++++++++++++++
# Git
# ++++++++++++++++++++++++++++++
sudo apt-get install git
git --version
#git version 1.9.1

# ++++++++++++++++++++++++++++++
#  (required for adb)
# ++++++++++++++++++++++++++++++
#bash: /usr/local/android-sdk-linux/platform-tools/adb: No such file or directory
sudo apt-get install lib32z1 lib32ncurses5 lib32bz2-1.0
#adb: error while loading shared libraries: libstdc++.so.6: cannot open shared object file: No such file or directory
sudo apt-get install g++-multilib

# ++++++++++++++++++++++++++++++
# Android SDK
# ++++++++++++++++++++++++++++++
# http://developer.android.com/sdk/index.html
# DOWNLOAD FOR OTHER PLATFORMS - SDK Tools Only - Linux 32 & 64-bit
# android-sdk_r22.6.2-linux.tgz
tar zxvf android-sdk_r22.6.2-linux.tgz
mv android-sdk-linux android-sdk_r22.6.2-linux
sudo mv android-sdk_r22.6.2-linux /usr/local/
sudo ln -s /usr/local/android-sdk_r22.6.2-linux /usr/local/android-sdk-linux
echo '' >> ~/.profile
echo '# Android SDK' >> ~/.profile
echo 'export ANDROID_SDK_HOME="/usr/local/android-sdk-linux"' >> ~/.profile
echo 'export PATH="$PATH:$ANDROID_SDK_HOME/tools"' >> ~/.profile
echo 'export PATH="$PATH:$ANDROID_SDK_HOME/platform-tools"' >> ~/.profile
source ~/.profile

# ++++++++++++++++++++++++++++++
# Android NDK
# ++++++++++++++++++++++++++++++
# https://developer.android.com/tools/sdk/ndk/index.html
# Linux 64-bit (x86)
# android-ndk-r9d-linux-x86_64.tar.bz2
tar xjvf android-ndk-r9d-linux-x86_64.tar.bz2
mv android-ndk-r9d android-ndk-r9d-linux-x86_64
sudo mv android-ndk-r9d-linux-x86_64 /usr/local/
sudo ln -s /usr/local/android-ndk-r9d-linux-x86_64 /usr/local/android-ndk-linux
echo '' >> ~/.profile
echo '# Android NDK' >> ~/.profile
echo 'export ANDROID_NDK_HOME="/usr/local/android-ndk-linux"' >> ~/.profile
echo 'export PATH="$PATH:$ANDROID_NDK_HOME"' >> ~/.profile
source ~/.profile

# ++++++++++++++++++++++++++++++
# Android w/Eclipse
# ++++++++++++++++++++++++++++++

# Run android command
# android

# Android SDK Manager
#   Installed
#     Tools - Android SDK Tools 22.6.2
#   default checked
#     Tools - Android SDK Platform-tools 19.0.1
#     Tools - Android SDK Build-tools 19.0.3
#     Android 4.4.2 (API 19) All
#     Extras - Android Support Library 19.1
#   install 13 packages

# Eclipse - Help - Install New Software...
#   Name: ADT Plugin
#   Location: https://dl-ssl.google.com/android/eclipse/

#   Developer Tools, NDK Plugins

#   Eclipse restart
#   -> Android SDK "Location of the Android SDK has not been setup in the preferences" -> Close
#   -> Welcome to Android Development -> Use exsting SDKs
#   Existing Location: /usr/local/android-sdk-linux
#   -> Next -> Finish

# Confirm : Eclipse - Window - Preferences - Android
share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.