Ubuntu (latest version: 12.04 LTS) is now the most popular GNU/Linux distribution on this planet; Android, the most popular operating system for Mobile Devices, both are rocking!

If you are a Android Developer (or an absolute beginner) – who wants to use Ubuntu as the development platform OR an Ubuntu user interested in developing Android Applications – then this post might be helpful in setting up Android Development Environment on Ubuntu 12.04 (a.k.a Precise Pangolin). Although, the setup process is primarily explained for Ubuntu 12.04 but it may works seamlessly on other GNU/Linux systems such as Linux Mint, Debian, OpenSuse, Fedora etc (and of course you would have to replace apt-get by yum in RPM based distro).

Setting Up Android SDK on Ubuntu 12.04 LTS

Android

Since Android uses Java as the programming language so you must install Java Development Kit (JDK) such as OpenJDK (Open Source implementation), followed by the Eclipse IDE and ADT plugins required for Android Development.

Step 1. Install JDK and Eclipse IDE

Although, you could install JDK or IDE separately (specially if you want specific version of JDK and Eclipse, Since Android SDK requires JDK 1.6+ and Eclipse Helios 3.6.2+) but eclipse-jdt package meets the above conditions so it would be much easier. Open a terminal and install Eclipse IDE as well as JDK, in one command (Installs Eclipse 3.7 + OpenJDK 6 ) –

sudo apt-get install eclipse-jdt

step 2. Download Android SDK Starter Package

Download Android SDK Starter Package (From Official Site)

step 3. Install ADT Plugins for Eclipse

Installing Android SDK

Now, Open Eclipse IDE and go to Help -> Install New Software  then click on Add and enter the URL :

https://dl-ssl.google.com/android/eclipse/

installing-adt-plugin

Now select the developer tools, then a couple of Next, followed by Finish would begin the Download/Installation process; Next, restart the Eclipse.

step 4. Install Android SDK

Then open Window -> Preferences and locate your Android SDK starter package.

locate-sdk-package

Then go to Window -> Android SDK Manager, Select the packages you want to install and click Install [x] Packages.

android-sdk-manager

Packages to select ?

Mandatory  packages are SDK Tools, SDK – Platform Tools and the SDK platform (2.1 (recommended if you want to target for 97%+ users) or 4.0.3 (the latest version at the time of writing this post)) for which you want to write the Application.

Select other packages depending on your need, although most recommended packages are – Documentation, Code Samples, USB Driver, Google API, Google Analytics SDK, Google Admob Ads SDK (If you want to show ads in your App) etc. Don’t select unnecessary packages – that you don’t need now – otherwise it may take much time to download/install all those stuffs.

Wait, until the download/install process complete (it may take a lot of time if your Internet connection is not very fast).

That’s All. Now it’s time start developing some cool Applications for Android. Have Fun!

Recommended Book(s) for Beginners

Join the Conversation

23 Comments

  1. doesnt work for me. Never shows the android sdk in the preferences section of help…. only 4 things to choose from. My list looks much different than yours

    1. It says that the packages are in fact installed. But still I cant figure out how to get the sdk up and running

      1. yeah I had this issue as well! if you want to save yourself some time just download Eclipse from the Eclipse website. make sure you install Java jdk, i’ve got jdk 6 and 7 installed.
         otherwise from step 2 onwards all is fine. great article thanks.

  2. Normally, this doesn’t work. I’ve found that to avoid strange problems you need to install JDK 6 from Oracle (not 7 nor OpenJDK) and Eclipse from Eclipse (not Ubuntu repositories). That always seems to work. Also, 64-bit platforms need is32-libs from the Ubunto repos.

    1. Also, don’t forget to change the default compiler in Eclipse’s preferences or it will use OpenJDK 6. Add the Oracle JDK installation location as the new default.and you don’t need to change the command-line compiler if you do all Androud development in Eclipse.

  3. Nope, doesn’t work. The version of eclipse which comes with ubuntu 12.04 is 3.7.2-1. Can’t install the Android SDK into that version.

    Are you SURE you tried this with your OWN eclipse installations on Ubuntu 12.04 64-bit?

  4. Did not work for me. Previously with Ubuntu12.04 64 bit I had issues trying to load the 32 bit libraries. So I’ve reinstalled Ubuntu. Then using Virtualbox I installed Ubuntu 12.04 32 bit and attempted to follow these instructions. Ubuntu 12.04 32 bit running under Virtualbox crashes in step 1,

    sudo apt-get install eclipse-jdt. Its crashed it twice now. Between instances I did apt-get remove.

  5. I did get it to install with Ubuntu 12.04 LTS 32 Bit in Virtualbox. Had to turn screen savers and power savers off. Also now using 1 cpu. Instructions only loaded SDK 4.01 though and the screenshots did not match. Plus they were a pain to figure out how to get to the screens in the examples. Still have to try and build an app.

  6. thanks too much about this but I found problem in this step

    Now, Open Eclipse IDE and go to Help -> Install New Software then click on Add and enter the URL :

    An error occurred while collecting items to be installed
    session context was:(profile=PlatformProfile, phase=org.eclipse.equinox.internal.p2.engine.phases.Collect, operand=, action=).
    No repository found containing: osgi.bundle,ch.qos.logback.classic,0.9.19.v20100519-1505
    No repository found containing: osgi.bundle,ch.qos.logback.core,0.9.19.v20100419-1216
    No repository found containing: osgi.bundle,ch.qos.logback.slf4j,0.9.19.v20100519-1910
    No repository found containing: osgi.bundle,javax.mail.glassfish,1.4.1.v201005082020
    No repository found containing: osgi.bundle,javax.xml,1.3.4.v201005080400
    No repository found containing: osgi.bundle,org.apache.xerces,2.9.0.v201005080400
    No repository found containing: osgi.bundle,org.apache.xml.resolver,1.2.0.v201005080400
    No repository found containing: osgi.bundle,org.apache.xml.serializer,2.7.1.v201005080400
    No repository found containing: osgi.bundle,org.eclipse.emf.common,2.6.0.v20100914-1218
    No repository found containing: osgi.bundle,org.eclipse.emf.ecore,2.6.1.v20100914-1218
    No repository found containing: osgi.bundle,org.eclipse.emf.ecore.change,2.5.1.v20100907-1643
    No repository found containing: osgi.bundle,org.eclipse.emf.ecore.xmi,2.5.0.v20100521-1846
    No repository found containing: osgi.bundle,org.eclipse.emf.edit,2.6.0.v20100914-1218
    No repository found containing: osgi.bundle,org.eclipse.jdt,3.7.2.dist
    No repository found containing: osgi.bundle,org.eclipse.jdt.core.manipulation,1.4.0.dist
    No repository found containing: osgi.bundle,org.eclipse.jdt.debug,3.7.1.dist
    No repository found containing: osgi.bundle,org.eclipse.jdt.debug.ui,3.6.1.dist
    No repository found containing: osgi.bundle,org.eclipse.jdt.junit,3.7.0.dist
    No repository found containing: osgi.bundle,org.eclipse.jdt.junit.core,3.7.0.dist
    No repository found containing: osgi.bundle,org.eclipse.jdt.junit.runtime,3.4.300.dist
    No repository found containing: osgi.bundle,org.eclipse.jdt.launching,3.6.1.dist
    No repository found containing: osgi.bundle,org.eclipse.jdt.ui,3.7.2.dist
    No repository found containing: osgi.bundle,org.eclipse.jem.util,2.1.3.v201012070000
    No repository found containing: osgi.bundle,org.eclipse.net4j.jms.api,3.0.0.v20110215-1551
    No repository found containing: osgi.bundle,org.eclipse.team.cvs.ssh,3.2.100.I20090508-2000
    No repository found containing: osgi.bundle,org.eclipse.wst.common.core,1.2.0.v200908252030
    No repository found containing: osgi.bundle,org.eclipse.wst.common.emf,1.2.3.v201012100400
    No repository found containing: osgi.bundle,org.eclipse.wst.common.emfworkbench.integration,1.2.3.v201012020600
    No repository found containing: osgi.bundle,org.eclipse.wst.common.environment,1.0.400.v200912181832
    No repository found containing: osgi.bundle,org.eclipse.wst.common.frameworks,1.2.0.v201003040800
    No repository found containing: osgi.bundle,org.eclipse.wst.common.project.facet.core,1.4.102.v201008170019
    No repository found containing: osgi.bundle,org.eclipse.wst.common.ui,1.1.500.v200911190730
    No repository found containing: osgi.bundle,org.eclipse.wst.common.uriresolver,1.1.401.v201004280700
    No repository found containing: osgi.bundle,org.eclipse.wst.sse.core,1.1.504.v201102160550
    No repository found containing: osgi.bundle,org.eclipse.wst.sse.ui,1.2.3.v201102102045
    No repository found containing: osgi.bundle,org.eclipse.wst.validation,1.2.201.v201101270100
    No repository found containing: osgi.bundle,org.eclipse.wst.xml.core,1.1.503.v201102102045
    No repository found containing: osgi.bundle,org.eclipse.wst.xml.ui,1.1.103.v201101122108
    No repository found containing: osgi.bundle,org.hamcrest.core,1.1.0.v20090501071000
    No repository found containing: osgi.bundle,org.junit,4.8.2.v4_8_2_v20110321-1705
    No repository found containing: osgi.bundle,org.mortbay.management,6.1.15.v201006150915
    No repository found containing: osgi.bundle,org.slf4j.api,1.5.11.v20100519-1910

    Would you please help me for that

    thanks very much

  7. and I thought for once it would be easy to install something in ubuntu…COME on!!! why cant it just be a click install??????????????

  8. Hi at stage three on clicking NEXT we get this: ‘Cannot complete the install because one or more required items could not be found.
    Software being installed: Android Development Tools 22.6.2.v201403212031-1085508 (com.android.ide.eclipse.adt.feature.group 22.6.2.v201403212031-1085508)’ …. any ideas?

  9. I followed the steps but after restarting, I see no way to open Android SDK. It is not showing in toolbar nor in the menu anywhere

Leave a comment

Leave a Reply to ksanger Cancel reply

Your email address will not be published. Required fields are marked *