Android SDK in Eclipse

Last updated 11.9.2012 (updated Java library location)

Since the old version of Eclipse was not stable for programming, the CSIF has installed the latest stable version of Eclipse. However, it does not come with the Android SDK installed, so this is the documentation for setting up the Android SDK on CSIF computers.

For non-CSIF computers, this documentation assumes you already have Eclipse Helios and Java installed.

Step 1: Opening Eclipse with the required Java library via terminal

  • On any CSIF machine, execute the following command:

$ eclipse -vm usr/java/latest/bin/java

Step 2: Installing the Android ADT Plugin for Eclipse

  • In the main window’s menu bar, go to Windows -> Preferences

If you don’t see Android on the left-hand side navigation pane, then you need to click the Cancel button and follow these steps to install the ADT plugin. Otherwise, click the Cancel button and go onto step 3.

  • In the Menu bar, go to Help -> Install New Software…
  • Click the Add button on the top right-hand corner
  • Enter “ADT Plugin” for Name and the following URL in Location:
https://dl-ssl.google.com/android/eclipse/
  • Click OK.
  • In the middle box, select the checkbox for Developer Tools and click the Next button
  • Click the Next button again to download the list of the tools
  • Read and accept the license agreements before clicking the Finish button

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

  • After the installation, you may get an error message regarding a lack of repositories for Eclipse JDT core; you may safely igonore this error
  • Restart Eclipse by closing it and opening it like in step 1

If during installation, there is an error about requiring “org.eclipse.wst.sse.ui”, then follow these set of instructions

 

  • In the main window’s menu bar, go to Help -> Install New Software…
  • Click the link for Available Software Sites
  • Select the entry named Helios in the Work with: drop-down menu.
  • If this is not present in the drop-down menu, then click the Add… button and enter the following URL in Location:

http://download.eclipse.org/releases/helios

  • In the middle box, select the checkbox for Mobile and Device Development and click the Next button
  • Click the Next button again to download the list of the tools
  • Read and accept the license agreements before clicking the Finish button
  • After the installation, restart Eclipse by closing it and opening it like in step 1
  • Go back to the beginning of step 2 to install the ADT plugin

Step 3: Adding the location of the Android SDK

If you have successfully installed the ADT Plugin, then you will be prompted to download the Android SDK once you restart Eclipse. However, the CSIF already has a copy of the Android SDK, so click the Cancel button and follow the steps below

  • In the main window’s menu bar, go to Windows -> Preferences
  • Highlight Android on the left-hand side navigation pane
  • Copy and paste the following location in the SDK Location field

/usr/local/android-sdk-linux_x86

  • Click the Apply button and you will see the list of different Android versions installed if successful; otherwise, check your SDK location

Step 4: Updating the Android Packages Tools (only on non-CSIF computers)

Requires root permission

  • In the main window’s menu bar, go to Windows -> Android SDK and AVD Manager
  • Highlight Available packages on the left-hand side navigation pane
  • Expand the entry for Android Repository
  • Select the checkbox for the desired Android version, or just select the checkbox next to Android Repository and click the Install Selected button

Step 5: Creating an Android virtual device

  • If you are already in the Android SDK and AVD Manager window, then highlight Virtual devices on the left-hand side navigation pane. If you are in the main window’s menu bar, then go to Windows -> Android SDK and AVD Manager
  • Click the New button
  • Enter the name of the device in the Name: field; the allowable characters are alphanumerical digits (A-Z, a-z, 0-9), periods (.), underscores (_), and hyphens (-)
  • Select the desired Android platfrom in the Target: drop-down menu
  • Set the other settings if desired before clicking the Create AVD button
  • Hit Escape on your keyboard to exit out of the Android SDK and AVD Manager window

 

Now you can develop your first Android application using the CSIF computers.

Here is the link for creating a “Hello World” application on the Android

Please contact us if you have any further questions.

Comments are closed.