Sunday, November 21, 2010

Fixing Android ADT After Upgrade to Ubuntu 10.10

After upgrading from Ubuntu 10.4 to Ubuntu 10.10, I found that the Android ADT plug-in was not showing up in Eclipse anymore. None of the features were accessible from the Eclipse menus. The "Help -> Install New Software..." dialog would hide the packages when "Hide items that are already installed" was checked, and attempting to re-install gave an "already installed" error message.

Some googling uncovered others with this problem, particularly this helpful post from Sonal. The fix is, basically, to delete the entire configuration directory for eclipse. While a bit heavy-handed for those with complex installations and many installed components, it was fine for me as all I'm doing is Android development. My steps were slightly different from Sonal's, so here's a recap:
  1. Exit eclipse if running
  2. Delete (or backup) ~/.eclipse/org.eclipse.platform_3.5.0_155965261
  3. Start eclipse
  4. Open Help->Install New Software
  5. Add the Eclipse 3.5 Default update site: http://download.eclipse.org/releases/galileo/
    (Note that I explicitly installed the WST Server Adapters, though adding the update site may be enough.)
  6. Add the GEF (Graphical Editor Framework) plugin update site: http://download.eclipse.org/tools/gef/updates/releases
    (I did not explicitly install GEF.)
  7. Add the Google Android ADT plugin update site: https://dl-ssl.google.com/android/eclipse
  8. Install the "Android DDMS" and "Android Development Tools" packages from the Android ADT update site.
Notably, the GEF plugin appears to be new. I don't recall installing this under Ubuntu 10.4. Also, I believe that if you just add the update sites for the dependancies (WST Server Adapters and GEF), they will be installed automatically when you install the Android ADT packages. No need to hunt them down and install them directly. I haven't verified this though.

There may be more re-configuration to be done. I'll update this post with anything I find as it comes up.

Saturday, November 13, 2010

(Not) Fixing Banshee Notification Area Icon in Ubuntu

I've been annoyed by the Banshee notification area icon in Ubuntu for a while now. I've changed Ubuntu to use the darker Ambiance theme as opposed to the light (blinding) Radiance theme. I really like it, except that Banshee's notification area icon displays the same with either theme, so it appears as a grey icon on an ugly white block.

I finally googled the issue and found these comments on the Ubuntu Forums. The wonderful Ubuntu community has created a replacement Banshee notification area plugin. The downside is that I've lost the notification popups that appear on song changes (which I kind of liked) and can no longer get a quick display/control area by hovering over the icon (which I never used anyway and actually found a little annoying). All-in-all it's a win for me!

Update 11/13/2010: Gah! Just after saving this post, I discovered that closing Banshee with this new notification icon in effect actually closes the program. With the default icon, "closing" the program leaves it running in the background while the notification icon stays in place, allowing you to control the "hidden" program from there. With the new community extension, this is no longer the case. A deal-breaker for me!!!

Update 11/14/2010: After upgrading to Ubuntu 10.10, all is well. The icon matches the rest of the supported notification area, and all functionality is intact. Phew!

Changing the Default Java Runtime Environment in Ubuntu

I've been having trouble with a couple Java programs in Ubuntu, so I'm attempting to switch the Java Runtime Environment from the OpenJDK, which is default in Ubuntu, to the official Sun runtime. I found instructions, which I've followed with the following changes:
  • the partner repository was added through the GUI Software Sources utility (System menu -> Administration -> Software Sources, or from the Ubuntu Software Center, Edit -> Software Sources)
  • The sun-java6-jre and sun-java6-fonts packages were installed by searching in the "Canonical Partners" section of the Ubuntu Software Store. The sun-java6-plugin package was not found and not installed.
Here's hoping things improve, and that there are no problems because of not installing the plugin package.

Thursday, November 11, 2010

Android Development - Starters Guide

I'm giving Android development another shot, and had to install Eclipse and the Android Development Tools again. Note that this is all on a box running Ubuntu 10.4.

The Android Developers site is a plethora of information, including setup instructions, a developer guide and reference, videos, tutorials, etc. The following pages seem to be the most relevant when first getting started:
  • SDK Download and Quick Start, which includes a to-the-point SDK Quick Start guide
  • Installing the SDK is a more thorough version of the Quick Start guide, including next steps such as recommended reading and tutorials
  • A Hello, World tutorial, the recommended first step for new developers
  • A Notepad tutorial, the recommended second step for new developers
  • Developer Resources lists a few other tutorials that may be worth looking at
Here are the steps I took to prepare my development environment per the 'Installing the SDK' instructions:
  1. I followed (and updated) my old post on Setting up Eclipse and Android Development Tools in Ubuntu to install the required Eclipse packages, and install the Android Development Tools plug-in for Eclipse. This covers steps 1 & 3 of the Quick Start / Installing the SDK guides.
  2. For step 2 of the guides, installing the Android SDK, I downloaded the Linux platform SDK file from the SDK download page and unpacked it from the terminal with 'tar xzvf [filename]'. I also added the SDK tools directory to my path, per instructions in the Installing the SDK guide.
  3. For step 4 of the guides, I ran the GUI 'Android SDK and AVD Manager' by typing 'android' at the terminal (the 'android' executable is in the SDK 'tools' folder). In the 'Available Packages' section, I installed everything. At this time, it included the SDK Platform and Google API packages for Android versions 1.5 - 2.2, the Samples for SDK API 7 and 8 (Android 2.1 and 2.2), and the latest Documentation package.
Note, I've let Eclipse use it's default '~/workspace/' path as my workspace, and I've unpacked the Android SDK into a folder under '~/dev/'. Also, the "Android SDK and AVD Manager" can also be launched from within Eclipse by selecting "Window -> Android SDK and AVD Manager". You must first tell it where to find the SDK by going to "Window -> Preferences -> Android".

From here I was able to successfully complete the "Hello, World" tutorial. Good luck, and happy coding!