views:

42

answers:

1

I'm using Eclipse 3.5.2 for Android development on Ubuntu 10.04. I installed:

  • Sun's JDK from Ubuntu's repositories;
  • Eclipse 3.5.2 (Classic) from eclipse.org, unpacked to /opt/eclipse
  • The Android SDK from android.com, unpacked to /opt/android-sdk

My problem is that when I'm in an Android project, JavaDoc will not work (neither for Android classes nor for Java classes). For example, if I hover my mouse over DateFormat, I get:

java.text.DateFormat

Note: The Javadoc for this element could neither be found in the attached source nor the attached Javadoc.

However, if I hover my mouse over DateFormat while I'm editing a normal, Java project, I do get the correct JavaDoc:

java.text.DateFormat

DateFormat is an abstract class for date/time formatting subclasses which formats and parses dates or time in a language-independent manner. ...

So the JavaDoc is there, it's just not accessible from inside Android projects, for some strange reason.

Any ideas what that reason might be?

+1  A: 

Just resolved this myself, here's what I did (from inside Eclipse):

  • Go to menu "Window" -> "Android SDK and AVD manager"
  • Click "Available Packages" in the window that appears
  • Check the "Documentation ..." package. Note that I had only one documentation package to choose from, and it was for a newer version of the SDK than what I was using, but it was good enough.
  • Click "Install Selected".

Now, just wait for the install to finish and you should have Javadoc hovers for most API calls.

Regards /J

Johan Walles