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
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
Now, Open Eclipse IDE and go to Help -> Install New Software then click on Add and enter the URL :
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.
Then go to Window -> Android SDK Manager, Select the packages you want to install and click Install [x] Packages.
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
- Learning Android (o’reilly media) By Marko Gargenta
- Programming Android (o’reilly media) By Zigurd Mednieks and others