How to generate links to the android Classes' reference in javadoc?

系统管理员 2022-06-09 21:30 279阅读 0赞

原文:http://stackoverflow.com/questions/2818204/how-to-generate-links-to-the-android-classes-reference-in-javadoc

Javadoc relies on a file called package-list to determine what Java packages are documented below a given directory. For some reason, such a file is missing for http://d.android.com/reference/, therefore the “naive” approach with

  1. -link http://d.android.com/reference/

doesn’t work – you get a warning that the package-list could not be retrieved and no links are generated into your docs. (Note: The checkboxes in that 2nd eclipse dialog just assemble -link parameters for you, so that doesn’t really make any difference)

However, Javadoc offers the -linkoffline parameter to be able to adjust for precisely this situation: You want to link to some other Javadoc documentation online, but you cannot access it at the time of generating your own docs. Here’s how it works: While -link takes only one parameter (the URL of the JavaDoc docs you want to link to), -linkoffline takes a second one. That one is the location of thepackage-list file!

So, to link to the online Android reference documentation, you should not select any checkboxes in the 2nd eclipse dialog, but instead add

  1. -linkoffline http://d.android.com/reference file:/C:/pathtoyour/android-sdk-windows/docs/reference

in the Extra Javadoc options in the 3rd dialog. That way you use the package-list of your locally installed Android docs, but the links in your generated Javadoc will still point to the online version anyway.

Hope it helps!

1340616119_1017.png

发表评论

表情:
评论列表 (有 0 条评论,279人围观)

还没有评论,来说两句吧...

相关阅读