How To Set Up Your Android Environment On Ubuntu

You first need to install the SDK(Software Development Kit) from the android developer page: http://developer.android.com/sdk/index.html

You can either download the ADT(Android Development Tools) bundle or just the SDK tools only. The ADT bundle includes a version of the eclipse IDE(Integrated Development Environment) with built-in ADT plug-in. I usually download just the SDK tools(That’s mostly for those who prefer other ides to eclipse)

I recently found out that there is a plugin for developing android in Netbeans but I’m yet to try it. You can also use IntelliJ for android development but I haven’t tried that either.

INSTALLATION PROCESS FOR THOSE WHO PREFER JUST THE SDK TOOLS

When the download is completed, extract the download file into a location of your choice. I usually prefer to install all my softwares in my /usr/local/ directory.

cd /usr/local/
sudo tar xzvf ~/Downloads/android-sdk_r20.0.3-linux.tgz

Now download and install eclipse

ECLIPSE INSTALLATION

You can download eclipse from: http://www.eclipse.org/downloads/ 

When download is complete extract the download file into a location of your choice

cd /usr/local/
sudo tar xzvf ~/Downloads/eclipse-jee-indigo-SR2-linux-gtk-x86_64.tar.gz
cd eclipse/

Now start eclipse with this command:

sudo ./eclipse

You can now download and install the ADT plugin for eclipse

In the eclipse IDE,

1. Navigate to Help > Install New Software

2. Type this address: https://dl-ssl.google.com/android/eclipse/ into the “Work with” field

3. Click the Add button

4. In the Add Repository popup that shows, choose a name eg. Android Plug-in and Click OK

5. Wait for the plug-ins to load and click the Select All button

6. Click next, On the Install Details form, Click next as well

7. On the Review Licenses screen, read and accept the license agreements and click the Finish button.

If you get a security warning saying that the authenticity or validity of the software can’t be established, click OK.

It will take a few minutes to install

8. When the installation completes, restart Eclipse.

Now You are ready to start developing those amazing Android apps

INSTALLATION PROCESS FOR THOSE WHO PREFER THE ADT BUNDLE

When the download is complete unzip the file to a location of  your choice. Like I stated previously I prefer to have all my installations to be in my /usr/local directory.

1. Change directory to that directory

 cd /usr/local 

2. Then unzip the file

 sudo unzip /home/eunice/Downloads/adt-bundle-linux-x86_64-20130729.zip 

This will create a directory with the name of the file you just unzipped.

If you list the files in the new directory(

ls adt-bundle-linux-x86_64-20130729

) you will find two directories(eclipse and sdk).

3. Change directory into the eclipse directory(

 cd adt-bundle-linux-x86_64-20130729/eclipse/ 

)

4. Launch eclipse from that directory(

sudo ./eclipse

)

The setup is complete.

Now let’s set up eclipse

ECLIPSE SETUP

Step 1: Eclipse will ask you to set a workspace(directory for saving your projects) as in the image below. Choose a directory and click OK.

1

Step 2: Contribute usage statistics? Choose yes or no and click finish

2

Now you are good to go.

The ADT bundle usually comes with just the latest API installed(as at now API 18) so you might want to update your SDK to install the older APIs.

Process for updating Android SDK

1. start the SDK manager in eclipse(In the eclipse IDE, navigate to Window > Android SDK Manager) as shown in the image below.

3

It will start the SDK manager as shown in the image below. Make sure you have Internet access. The SDK manager will load all the tools and APIs.

5

select the APIs and tools you want to update and click the “Install packages” button

the packages will be downloaded and installed but this might take a while.

When the installation is complete, restart eclipse(File > Restart) as in the image below.

4

Now You are ready to start developing those amazing Android apps

Happy Coding!!!

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s