Sunday, May 22, 2011

Installing the Android SDK in Linux Mint 11

In a slight change of direction, I'm going to cover the installation of the Android SDK for those of you out there that are interested in developing and designing themes in Linux.

First thing we will want to do is prepare our computer by downloading and installing Eclipse. To do this, open up terminal and type the following command:

sudo apt-get install eclipse

Hit yes and let everything install. After that is done, select menu and search for and run Eclipse. The first screen you will be greeted by will look like the one below:



Just hit next to continue past the screen, or designate a folder for your workspace. If you'd like the folder to be hidden put a period in front of it. Now that we're in Eclipse, we need to set up the repository for the Android Development Tools (ADT) and download them. Click on Help and select Install New Software. From here, you want to click "Add..." and you should be at this screen now:



In the location section of this window, you want to put the following address:

https://dl-ssl.google.com/android/eclipse/

When you click OK the source will load (if for some reason this source isn't selected with "Work With", just change it) and you should see the Android Development Tools listed. Check all of them and click next through all of the menus and accept the licensing agreement.



Now let's put Eclipse on hold for a minute and go to the Android SDK Download page and get the .tgz file for Linux (i386). Once this is downloaded, open the terminal and go to the directory that it was downloaded to (possibly ~/Downloads) and if you are interested in checking the checksum against the one on the website, type:
md5sum android-sdk_r11-linux_x86.tgz

If all goes well, you'll be greeted by a checksum that matches the one on the website. Now to extract the .tgz file and move it to the home directory:

tar zxvf android-sdk_r11-linux_x86.tgz
mv android-sdk-linux_x86 ~/

If you'd like, you can delete the .tgz file now by typing rm android-sdk_r11-linux_x86.tgz. Now, return to Eclipse and go to Window -> Preferences. On this screen you want to select Android on the left side. For SDK Location, you will want it to be (depending on your version):

/home/username/android-sdk-linux_x86



So far, so good. You may or may not see this error pop up though:



No need to panic though, click Okay to get out of this and go back to the main Eclipse menu and then go to Window -> Android SDK and AVD Manager. On the left side, select Available Packages and then under "Android Repository" install the Android SDK Platform-tools, revision 4. Once that is installed, everything should be up and running and you'll have something that looks like this:



**There was an error in the bottom of the above screenshot that I got rid of by resetting Eclipse. I forgot to take a screenshot of it and wanted to mention that I had an error appear, but was still able to compile a "Hello World" script.

If you're interested in getting the Graphical Editing Framework installed, just go to Help -> Install New Software... Add the site listed below:

http://download.eclipse.org/tools/gef/updates/releases/

Select this repository and just choose the version of the Graphical Editing Framework that you want. It will install the same way as ADT did previously.

Finally, the Android Debug Bridge (ADB) can be located in the following directory and with the following commands:

cd ~/android-sdk-linux_x86/platform-tools
./adb

This will give you a laundry list of command tools for ADB.

**As an additional side note, I don't actually program for the Android OS. I did this writeup to help and encourage the Android community to program in the Linux environment. If for any reason this write up is incomplete, please let me know and I'll see what I can do to help complete it.

No comments:

Post a Comment