Start-up Guide
Installation
of
JDK-6, Eclipse and
Android SDK-2.1
(On Ubuntu and Kubuntu)
By:
Jayesh A Tembhekar
Date:
31-10-2010
Index
1. Introduction
2. Installation of JAVA (JDK-6u22)
3. Installation of Eclipse
4. Installation of Android SDK-2.1
4.1. SDK installation
4.2. Popular way of installing packages
4.3. The Other way of installing packages
5. Integreting Android SDK with Eclipse
5.1. Popular way of eclipse plugin installation
5.2. The Other way of plugin installation
1. Introduction
This document contains step by step instructions to set-up Android developmemt environment,
and scope limited to set-up JDK, Eclipse, and their intigration with Android SDK. At the end, a
“Hello world” program has been written to test the set-up.
2. Installation of JAVA (JDK-6u22)
Installation
1. Download latest JDK set-up file (e.g. [Link]) from
[Link]
2. Copy the file “[Link]” at desired location e.g. “/home/jayesh/”
3. Move in to directrory where set-up file has been copied e.g.”/home/jayesh/”
#cd /home/jayesh/
3. Run the set-up file
#./[Link]
4. Now new directory may have been created with name “jdk1.6.0_22” in current directory .
Now you can remove JDK set-up file from current location e.g. “/home/jayesh/”.
#rm -rf /home/jayesh/[Link]
Configuration
1. Open the “.bashrc” file to set-up the JAVA path
#vim ~/.bashrc
2. Add the following lines at the bottom of the file.
export PATH=$PATH:.:/home/jayesh/jdk1.6.0_22/bin/
In above path, “/home/jayesh/jdk1.6.0_22/bin/” is the fully qulified path of “bin/” directory in
“jdk1.6.0_22/” directory.
export JAVA_HOME=/home/jayesh/jdk1.6.0_22/
In above path, “/home/jayesh/jdk1.6.0_22/” is the fully qulified path of “jdk1.6.0_22/”
directory.
3. To effect the modification system wide run following command
#source ~/.bashrc
4. Now you can test java set-up by running following command.
#java -version
You may get the output as follows
java version "1.6.0_22"
Java(TM) SE Runtime Environment (build 1.6.0_22-b04)
Java HotSpot(TM) Client VM (build 17.1-b03, mixed mode, sharing)
3. Installation of Eclipse
Installation
1. Download Eclipse IDE zip (e.g. [Link]) from
[Link]
2. Copy the file “[Link]” at desired location
e.g. “/home/jayesh/”
3. Extract the Eclipse in desired directory
#cd /home/jayesh/
#tar -xzvf [Link]
4. Now “eclipse/” directory may have been created in current location.
5. Copy “jre/” directory inside “/home/jayesh/eclipse/” from “/home/jayesh/jdk1.6.0_22/”
#cp -r /home/jayesh/jdk1.6.0_22/jre /home/jayesh/eclipse/
Configuration
1. Open the “.bashrc” file to set-up the Eclipse path
#vim ~/.bashrc
2. Add the following lines at the bottom of the file.
export PATH=$PATH:.:/home/jayesh/eclipse/
In above path, “/home/jayesh/eclipse/” is the fully qulified path of “eclipse/” directory.
3. To effect the modification system wide run following command
#source ~/.bashrc
6. Now you can run Eclipse
#eclipse
4. Installation of Android SDK-2.1
4.1 SDK installation
Installation
1. Download Android SDK (e.g android-sdk_r07-linux_x86.tgz) from
[Link]
2. Copy the file “android-sdk_r07-linux_x86.tgz” at desired location
e.g. “/home/jayesh/eclipse/”
3. Extract the Android in desired directory
#cd /home/jayesh/eclipse
#tar -xzvf android-sdk_r07-linux_x86.tgz
4. Now “android-sdk-linux_x86/” directory may have been created in current location.
Configuration
1. Open the “.bashrc” file to set-up the Android path
#vim ~/.bashrc
2. Add the following lines at the bottom of the file.
export PATH=$PATH:.:/home/jayesh/eclipse/android-sdk-linux_x86/tools
3. To effect the modification system wide run following command
#source ~/.bashrc
6. Now you can run Android
#android
4.2 Popular way of installing packages
1. Run the Android
#android
2. Select “Available Packages” option in left pane
3. Press “Refresh” button in bottom right pane; list of packages may have been appeared.
4. Select “android-2.1_r02-linux” with API level 7 option; press “Install selected” button.
5. Select “Installed Packages” option in left pane
6. Press “Refresh” button in bottom right pane; list of packages may have been [Link]
that “SDK platform Android2.1 update1, API 7 revision 2” should apear in right pane
4.3 The Other way of installing packages
1. Download “android-2.1_r02-[Link]” manually by searching it in [Link].
2. Copy and extract the zip file in your Android SDK's “../android-sdk-linux_x86/platforms/”
directory.
#cp -r /<full path>/android-2.1_r02-[Link] /home/jayesh/eclipse//android-sdk-linux_x86/platforms/
#cd /home/jayesh/eclipse//android-sdk-linux_x86/platforms/
#unzip android-2.1_r02-[Link]
3. Now Run the Android
#android
5. Select “Installed Packages” option in left pane
6. Press “Refresh” button in bottom right pane; list of packages may have been [Link]
that “SDK platform Android2.1 update1, API 7 revision 2” should apear in right pane
5. Integreting Android SDK with Eclipse
5.1 Popular way of eclipse plugin installation
[Link] the Eclipse
#eclipse
[Link] to
Help > Install new software > (Work with:) Add
[Link] following inputs then press “Ok”
Name : Android2.1
Location: [Link]
Press “Ok”.
4. In “Install” window, Select “Android DDMS” ”Android Development Tool” check box under
“Develoment Tools”, in Name-version pane, then press “Next”, see “Install details”.
5. Press “Next” , Accept the terms and conditions ,press “Finish” . Security warnning dialogue
box may apear on screen , for unsigned contents, press “Ok”. Set-up may want to restart the
Eclipse, do it.
[Link],To make Eclipse aware of Android SDK go to
Windows > Preferences > Android
[Link] Android SDK location then press “Apply”
SDK Location : /home/jayesh/eclipse/android-sdk-linux_x86/
8. “Android 2.1 update 1” should appear in ”Target name” pane. Finally Press “Ok”
5.2 The Other way of plugin installation
1. Download the “[Link]” manually
2. Copy it in “/home/jayesh/eclipse/android-sdk-linux_x86/”
3. Run the Eclipse
#eclipse
4. Go to
Help > Install new software > (Work with:) Add
5. Give following inputs then press “Ok”
Name : Android2.1
Location: < > press “Archive” button, select “[Link]”
in “/home/jayesh/eclipse/android-sdk-linux_x86/” ; Press “Ok”.
6. In “Install” window, Select “Android DDMS” ”Android Development Tool” check box under
“Develoment Tools”, in Name-version pane, then press “Next”, see “Install details”.
7. Press “Next” , Accept the terms and conditions ,press “Finish” . Security warnning dialogue
box may apear on screen , for unsigned contents, press “Ok”. Set-up may want to restart the
Eclipse, do it.
8. To make Eclipse aware of Android SDK go to
Windows > Preferences > Android
9. Provide Android SDK location then press “Apply”
SDK Location : /home/jayesh/eclipse//android-sdk-linux_x86/
10. “Android 2.1 update 1” should appear in ”Target name” pane. Finally Press “Ok”