Rohit Mishra

Thoughts which don’t fit in 140 characters.

Installing Android SDK on Ubuntu 11.10

| Comments

The first step in installing the Android SDK is installing the Sun (Oracle) JDK. Java 7 is out now, but I will stick with the recommended Java 6. Sun JDK is not available in the Ubuntu repositories, so you need to install it using this method.

  1. Open Ubuntu Software Center, using the Super (Windows) Key and searching for Software Center.

  2. Search for Synaptic Package Manager and install it.

  3. Start Synaptic (using the same Super Key + search term method)

  4. Click on Settings/Repositories.

  5. Click on “Other Software” Tab and click ADD. In the APT line copy this: ppa:ferramroberto/java

  6. Click Add Source and then Add Volume and close.

  7. Back in Synaptic window, click on reload. Once reloaded, in the quick filter field type java6.

  8. Click and Mark for Installation these items: sun-java6-bin, sun-java6-jre, sun-java6-jdk, sun-java6-plugin.

  9. Click Apply. Packages will be downloaded and you will have to accept the License Agreement. You are done with installing Sun JDK.

  10. Now, go back to the Software Center and search for Eclipse. Click on Install. Alternatively, you can download Eclipse IDE for Java Developers from this link.

Now lets install the ADT Plugin for Eclipse. Detailed instructions are provided for doing so on the Android Developer website, but I am copying them here anyways for easy reference.

Downloading the ADT Plugin

Use the Update Manager feature of your Eclipse installation to install the latest revision of ADT on your development computer.<>

Assuming that you have a compatible version of the Eclipse IDE installed, as described in Preparing for Installation, above, follow these steps to download the ADT plugin and install it in your Eclipse environment.

  1. Start Eclipse, then select Help > Install New Software….

  2. Click Add, in the top-right corner.

  3. In the Add Repository dialog that appears, enter “ADT Plugin” for the Name and the following URL for the Location:

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

  4. Click OKNote: If you have trouble acquiring the plugin, try using “http” in the Location URL, instead of “https” (https is preferred for security reasons).

  5. In the Available Software dialog, select the checkbox next to Developer Tools and click Next.

  6. In the next window, you’ll see a list of the tools to be downloaded. Click Next.

  7. Read and accept the license agreements, then click Finish.Note: If you get a security warning saying that the authenticity or validity of the software can’t be established, click OK.

  8. When the installation completes, restart Eclipse.

Configuring the ADT Plugin

After you’ve successfully downloaded the ADT as described above, the next step is to modify your ADT preferences in Eclipse to point to the Android SDK directory:

1. Select **Window** > **Preferences...** to open the Preferences panel.


2. Select **Android** from the left panel.

You may see a dialog asking whether you want to send usage statistics to Google. If so, make your choice and click Proceed. You cannot continue with this procedure until you click Proceed.

  1. For the SDK Location in the main panel, click Browse… and locate your downloaded SDK directory.

  2. Click Apply, then OK.

Now, go to Window - Android SDK Manager. Install the Android versions that you want to develop for. Android 2.1 is supported on majority of Android devices and you should target your app to run on 2.1 You can find detailed instructions about working with the Android SDK manager at the Android Developer website. http://developer.android.com/sdk/installing.html

You are now ready to start developing your Android application. You can do a quick Hello World by following this link or go to the Dev Guide. If you are interested in a book to get you started, I will recommend Apress’ Beginning Android 2 (Amazon / Flipkart )

Comments