How to setup Android SDK on Linux ubuntu(Ubuntu 10.10 in our case)
Friends, You know very well that
Android is the buzzword nowadays and it is just rocking all the way in mobile
arena. Being open source and as the learning curve is pretty easy we cannot
stop ourselves being avid admirer of Android. Everything is just going great
with Android for now. As a developer or tester you must have installed Android
SDK on windows OS and it must be pretty easy for you going along with it.
But have you ever wondered how can we develop the android apps in Linux OR one
step behind How to install Android SDK on Linux?
Well, there was a requirement in our
project where we have been asked to develop the project in Linux than our
traditional platform Windows. We literally had to start from scratch and we
faced quite a lot problems while installing Android SDK on Linux since both of
us were newbie in Linux. So here in this article we are going to tell you
something interesting. We are going to explain the step by step process of how
to install Android on your Linux machine. I hope you will like it as it is
pretty interesting. So let’s get started.
The main components required are:
- Android
SDK setup, Eclipse ( A development environment for java and now android)
- ADT plugin
for eclipse
- JDK(Java
Development Kit)&
- JRE(Java
runtime Environment).
Please note that you may not need to
install eclipse & ADT plug in if you are just going to use the setup for
testing.
I hope you have a basic idea about
Linux command line &.bash. If not just have a look atthem before starting.
Step by Step Guide to Install Android
SDK on Linux:-
1) Download
JDK and JRE:
➢ download Jdk1.6 and jre1.6:
Download following installation files
from Sun java site.
✔ jdk-6u23-linux-i586.bin
✔ jre-6u23-linux-i586.bin
➢ Install JRE and JDK
➢ Set JAVA_HOME / PATH variables Under Linux Bash Profile:
In linux, unlike windows all the environment
variables and the corresponding paths are saved in a special file known as
.bashrc file. This file is hidden. It is stored in your root folder. So after
going into root folder, click on “View option-> show hidden files”.
The.bashrc file will now be visible.
Open this file and add following lines at the bottom:-
e.g. If your path is set to
/usr/java/jdk1.5.0_07/bin/java, set it as follows:
export JAVA_HOME=/usr/java/jdk1.5.0_07/bin/java
export PATH=$PATH:/usr/java/jdk1.5.0_07/bin
——————————————————————————————————
2) Download and install Android SDK
for linux:
After downloading, unzip the file and
save it at appropriate location and also set the
path at very bottom of .bashrc file as:
export PATH=${PATH}:/home/”Your
loginfolder”/android-sdk_r08-
linux_86/android-sdk-linux_86/platform-tools
——————————————————————————————————
3) Download ADT 8.0.1.
URL: – http://dl.google.com/android/ADT-8.0.1.zip
——————————————————————————————————
4) Download Eclipse 3.6 (Helios)
Eclips 3.6 can be downloaded from
eclips site (http://www.eclipse.org/downloads/?tab=developer)
I have installed Eclipse 3.6 on my PC
but in forums they have suggested to use
Eclipse 3.5 rather than 3.6.So here is
the download link for Eclipse 3.5:-
http://archive.eclipse.org/technology/epp/downloads/release/galileo/R/eclipse-
java-galileo-linux-gtk.tar.gz
——————————————————————————————————
5) Configure Eclipse:
- Now set
the path of jdk in the eclipse.
- Edit Eclipse.ini
file.
- Add lines
given below just above “-vmargs”.
-vm
/home/”Your loginfolder”/Downloads/New/new1/jdk1.6.0_23/bin/java
——————————————————————————————————
6) Installing the ADT Plugin in
Eclipse
- Start
Eclipse, then select Help > Install New Software.
- Click Add
in the top-right corner.
- In the Add
Site dialog, click Archive.
- Browse and
select the downloaded zip file.
- Enter a
name for the local update site (e.g., “Android Plugin”) in the “Name”
field.
- Click OK.
- In the
Available Software dialog, select the checkbox next to Developer Tools and
click Next.
- In the
next window, you’ll see a list of the tools to be downloaded. Click Next.
- Read and
accept the license agreements, then click Finish.
- When the installation
completes, restart Eclipse.
——————————————————————————————————
7) Now we have only installed the
Android setup. We Now launch SDK manager and
Download the current version of android
for which we need to build/test the Application.
Set Sdk path in Eclipse: – If you have
installed eclipse, you need to set up the path
Of android SDK in the eclipse. Do it as
follows.
- Select Window
> Preferences… to open the Preferences panel (Mac OS X
Eclipse > Preferences).
- Select Android
from the left panel.
- For the
SDK Location in the main panel, click Browse… and locate your
downloaded SDK directory.
- Click Apply,
then OK.
——————————————————————————————————
8 ) Go to android SDK>tools>emulator
The Emulator WILL NOT start. This is because you need to change the file
Permission as executable to let the OS
know that it is an executable. Otherwise it
Won’t recognize. So:-
- Go to the
android installation directory->tools->Emulator.
- Right
click on emulator icon.
That’s it! You are now ready to play
with the Android on Linux. Let us know if you have any query.
Comments
Post a Comment