New version of ADT r17 plugin for Eclipse added feature to automatically setup JAR dependencies. Any .jar files in the /libs folder are added to the build configuration now. Unfortunately Android Dependencies classpath container is non modifiable.
How can i attach javadoc and sources to the automatically inserted .jar (from /libs folder)?
On ADT 22 I could not access Javadoc for both commons-io-2.4.jar and android-support-v4.jar
This is the way I fixed it:
Precondition: both libraries are listed under "Referenced Libraries".
Right click on commons-io-2.4.jar and select Properties. This window appears:
commons-io-2.4.jar is bundled with commons-io-2.4-javadoc.jar, so I specified the Javadoc in archive External file path.
I did the same thing for the support library: right click on android-support-v4.jar and select Properties. This screen appears:
This time I specied the path to the source directory.
An answer come from http://code.google.com/p/android/issues/detail?id=27490#c21
In your libs folder, you must have:
And in your
foo.jar.properties
, just putdoc=./doc/foo_doc
Maybe you will have to refresh your project, to clean it, to close it and to reopen it.
It works for me!
For any given jar, if you would like to see the Javadoc help on the tooltip while coding, do the following: Right click your project > Properties > Java Build Path > Libraries Tab. Click the arrow next to your jar to expand.
Source attachment should point to the location of the actual jar (probably right in your java folder).
Javadoc location: You have two choices here: URL and archive. If your javadocs for this jar are in the form of a folder containing an index.html file at the first level, choose 'Javadoc URL' and point to that folder. If your javadocs are in a jar, choose 'Javadoc in archive' and point to the jar. Don't forget to restart your workspace/close and reopen your project to update the tooltip with the Javadoc info.
I hope this helps give a simple answer for what I believe should be a very simple task.
For now, move the library you want Javadoc to
lib
. Them add that library to theBuild Path
and add the Javadoc.Check this comment in the android issues.
The library reference to commons-io-2.0.1.jar was broken when I upgraded to SDK Tools and ADT revision 17.
To resolve the problem I used Project -> Properties - > Java Build Path and I selected the Libraries tab. I deleted any reference to commons-io-2.0.1.jar and then used Add Jar to re-add commons-io-2.0.1.jar to the project. Then I click the ‘>’ arrow next to the library name to expand the library reference and I used the edit buttons to set the Source attachment and the Javadoc location.
Sorry I can't post an image as I don't have enough rep (please...).
Seems to be a moving target but, after having collected bits and pieces from many places (including answers to this very question that helped but failed to describe all necessary details, or maybe the system had changed slightly in the meantime), this seems to be the solution, at least as of now (August 28, 2013).
lib
folder, add anxxx.jar.properties
file for each lib you want to associate a javadoc with.doc=d:\\Android\\javadoc\\libGoogleAnalyticsServices
Failing to observe any of these steps (not unzipping the javadoc, referencing a file instead of a folder, etc) seems to break it.