Pages

Thursday, February 9, 2012

Installing the Android SDK on Ubuntu 11.10

My harddrive failed, forcing me to reinstall my OS. I decided to upgrade to Ubuntu 11.10, so this is basically a rehash of my previous instructions for Ubuntu 11.04.

  1. Make sure that you have the 32bit compatibility libraries installed if you are using 64bit Ubuntu

  2. If you fail to install the 32bit compatibility libraries you will get an 'adb version' error at the end when you run Eclipse. If you are running 64bit Ubuntu, start out by installing the 32bit libraries

    ~$ sudo apt-get install ia32-libs

  3. Install the JDK
  4. This should be a straight forward step

    ~$ sudo apt-get install openjdk-6-jdk

  5. Download and install Eclipse
  6. Find and download an appropriate version of Eclipse. Since my last instructions for 11.04, the version of Eclipse in the Ubuntu repositories has jumped to 3.7. Hooray! Go ahead and install Eclipse

    ~$ sudo apt-get install eclipse

  7. Download and install the Android SDK
  8. Following the instructions here, which include a download link, install the SDK. You can download it with this command

    ~$ wget http://dl.google.com/android/android-sdk_r16-linux.tgz

    Next, untar the package

    ~$ tar -xvzf android-sdk_r16-linux.tgz

    You will need to remember where these files ended up when you install the ADT plugin for Eclipse. If you followed these instructions, you should have extracted the files to ./android-sdk-linux/

  9. Install the ADT Plugin in Eclipse
  10. The next next step historically posed me the most problems. This time proved no different. Rather than plagiarize the steps, just look here for the instructions. To summarize the steps, you must open Eclipse, add the ADT plugin location, and install the ADT plugin within Eclipse. Once installed, you must point Eclipse to the location of the Android SDK folder, previously installed.

    If you get the following error during the install

    Cannot complete the install because one or more required items could not be found. Software being installed: Android Development Tools 16.0.1.v201112150204-238534 (com.android.ide.eclipse.adt.feature.group 16.0.1.v201112150204-238534) Missing requirement: Android Development Tools 16.0.1.v201112150204-238534 (com.android.ide.eclipse.adt.feature.group 16.0.1.v201112150204-238534) requires 'org.eclipse.wst.sse.core 0.0.0' but it could not be found

    then try running Eclipse as root.

    ~$ sudo eclipse

    and try again. This did the trick for me. It seems to be a problem on 64 bit Ubuntu with Eclipse v3.7


  11. Install Additional Android Developer Components
  12. Now, in a terminal, and go to the android-sdk-linux_x86/tools/ directory and run the Android program to open the Android SDK and AVD manager.

    ~$ cd ~/android-sdk-linux/tools/
    ~/android-sdk-linux/tools$ ./android

    You should get a window like this

    Select 'Available packages' on the left. Next, select the components that you want. Google provided a list of suggested components here. Once you have selected the packages that you want, click the 'Install selected' button on the bottom right. Depending on what you select, it may need to download several hundred mb. This can take awhile. You can find more information on using the SDK and AVD manager here.

  13. Setting up your PATH variable (Optional)
  14. In Ubuntu, you want to open your .bashrc file. A simple

    ~$ gedit ~/.bashrc

    will open the file. Next, add the following line to the end of .bashrc

    export PATH=${PATH}:(path-to-sdk)/android-sdk-linux/tools:(path-to-sdk)/android-sdk-linux/platform-tools

    replacing (path-to-sdk) with the path to where you installed the sdk. If you followed this tutorial, it will probably be in your home directory.

  15. Creating an AVD
  16. If you've made it this far, before you dive into your 'Hello World' application, you need to create an AVD, or Android Virtual Device.

    First, if you haven't already installed a platform in Step 5. Once you have a platform installed, follow the instructions here

  17. Start Programming!
  18. If all went well, you are ready to start developing an app for Android!


Some Notes

The official Android SDK instructions say you might have to fiddle with the USB settings to get your physical hardware to play nicely with the debugger. All I had to do was to enable USB Debugging under application settings on the Android device and I was on my way. That was a nice surprise.

This time around, installing the SDK went smoothly. I think the SDK and Ubuntu showed some maturity in the ease of installing the SDK. Last year I had to fight a little with things just to get anything to work.


Was this helpful?

Did this work for you? Were you able to install the SDK fine on your machine? What problems did you have?

Let me know by leaving a comment!

28 comments:

  1. Hi there,
    I could not find any e-mail addr to send to, so I hope you get this and perhaps able to help me.
    I have installed ubuntu 11.10 on a Ora.VBox. I tried to install JDK with the command above but it complained "unable to locate package openjdk".
    Thx&Rgds,
    Shah

    ReplyDelete
    Replies
    1. Is that the exact error message? If so, you have to select a version of the open jdk, such as

      openjdk-6-jdk

      or

      openjdk-7-jdk

      If those don't help you, make sure you run a

      sudo apt-get update && sudo apt-get upgrade

      and watch for repo's that fail.

      Delete
    2. Thank you for your guidelines. Really useful one.

      Learn and Update your skills in Android with

      Best Android Training Institute in Chennai
      Android Classes in Chennai

      Delete
  2. This comment has been removed by the author.

    ReplyDelete
  3. This comment has been removed by the author.

    ReplyDelete
  4. Enjoying your post. Keep sharing. Get job oriented salesforce training from IT expects.
    Salesforce Training

    ReplyDelete
  5. The best part of Android is that you have a number of options with you, and not only some of them..!
    https://www.oukitelcentral.com/

    ReplyDelete
  6. Both these stages have their own upsides and downsides with regards to game improvement. Get the facts

    ReplyDelete
  7. Just found your post by searching on the Google, I am Impressed and Learned Lot of new thing from your post.

    Andorid Training in Chennai | Android Training Institute in Chennai

    ReplyDelete
  8. Thanks for your extraordinary blog. Your idea for this was so brilliant. This would provide people with an excellent tally resource from someone who has experienced such issues.
    web designing training in chennai

    web designing training in omr

    digital marketing training in chennai

    digital marketing training in omr

    rpa training in chennai

    rpa training in omr

    tally training in chennai

    tally training in omr

    ReplyDelete
  9. The information you provided is very useful, thank you very much for sharing useful information with us. You can apply for a Turkey visa online. You can get your Turkey Visa in just 1 hour by selecting the express processing type. It only takes 5 minutes to apply for an electronic visa Turkey. Apply Online.

    ReplyDelete
  10. Rekordbox DJ CRACK is an amazing, full featured and free DJ software.n Full license keys [Mac + Win] Free download from the links below. RekordBox Dj License Key Generator

    ReplyDelete
  11. Internet Download Manager full version free download has a simple graphical user interface, making it user-friendly and easy to use. IDM Full Verson

    ReplyDelete
  12. Pictures and meaning about “The supreme happiness of life consists in the ... Victor Hugo quote about love from Les Misérables - The supreme happiness of .To Love Beauty Is To See Light

    ReplyDelete
  13. The Top things to do in Edirne. The Selimiye Mosque, an architectural marvel created by the famed Ottoman architect Mimar Sinan, is one of the best things to do in Edirne. Its massive dome and beautiful internal embellishments are breathtaking.

    ReplyDelete
  14. The evisa Kenya gov website offers a user-friendly interface, guiding applicants through the step-by-step process of completing the application form. Our website provides information on the visa fees and payment options. Once the application is submitted, applicants can track the status of their eVisa online. After the visa is approved, it is issued and sent to the applicant's email address

    ReplyDelete
  15. I sincerely appreciate your clear kindness in making this priceless material available for sharing. Qatar Launches Hayya Platform For Streamlined Visa Processes. This platform offers a convenient and efficient way to apply for visas, reducing the time and effort required for visa applications. With the Hayya platform, individuals can access and complete their visa applications online, providing a user-friendly experience. Travelers planning to visit Qatar should take advantage of this new system to simplify their visa application process and save valuable time.

    ReplyDelete
  16. You have an incredible way with words! Being a huge admirer of your writing, I'm absolutely blown away by this paragraph. I can't wait to devour more posts that measure up to this exceptional quality. Also, I'd like to Sharing valuable information about Visa-Free Entry for Egyptians.Visa-Free countries for Egyptians refer to destinations around the world where Egyptian passport holders can travel without the need for a visa.

    ReplyDelete