Setting Up the Development Environment on Linux

Not a lot of difference arises when configuring the environment on the Linux platform. The following steps explain how to configure the development environment on Ubuntu Linux:

1. Download and install the Java Standard Edition Development Kit. Use the sudo apt-get install sun-java6-jdk command in a terminal window to download and install JDK 6 on your system.

2. Download and install ANT. Use the sudo apt-get install ant command in a terminal window to download the necessary software and install it on your system.

3. Download the Android SDK compressed zip file. Unzip Android SDK into a folder.

4. Download and extract Eclipse into your home directory.

5. You can set the necessary environment variables in the .bashrc file (see Figure 11.2). This allows you to invoke the Android tools and Eclipse from any directory using a terminal window. Alternatively, you can create a shortcut to Eclipse so that you can invoke it from your desktop. Enter the following three lines in your .bashrc file:

export ANDROID_HOME = <<Path to Android SDK folder>>

export ECLIPSE_HOME = <<Path to eclipse>>


FIGURE 11.2_

Setting environment variables in .bashrc.

6. Now you can invoke Eclipse by typing eclipse in the terminal window. Similarly, you can invoke the other Android tools directly from the terminal window as well.

£dit jarminal jabs l_iplp

¿alias dir-'dir ^color-auto' #dlid!> vdir='vdir --color=auto'

#alias qrep='grep "Color=auto' ¿alias fgrep-'fgrep color-auto' fdlids egrep-'egrey --color=duto'

# some more Is aliases #dlidt> -V «alias las'is A1 »alias l='ls -CF'

# enable progrdmmdble completion features (you don't need to enable

# this, if it's already enabled in /etc/bash.bashrc and /etc/profile

# sources /etc/bash.bashrc).

if | *f /etc/bash completion I; then . /etc/bash completion fi I

export ANDROID HOME-1/home/prasanna/libraries/android■sdk-linux X86-1.G r2' export PATH-SPATHiSAHDROID HOHE/tools

0 0

Post a comment