Eclipse Android 项目中的 JavaDoc

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/2268183/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-20 05:13:25  来源:igfitidea点击:

JavaDoc in an Eclipse Android Project

androideclipsejavadoc

提问by Robert

In our Android project, our code is JavaDoc'd and that generates everything properly. However, any reference to the Android API classes/functions results in a JavaDoc error and a link to the relevant information is not generated. Instead we get plaintext class names. How can we set up Eclipse to turn these into links to the online Android API reference (preferably) or a local copy (if necessary)?

在我们的 Android 项目中,我们的代码是 JavaDoc 的,可以正确生成所有内容。但是,对 Android API 类/函数的任何引用都会导致 JavaDoc 错误,并且不会生成指向相关信息的链接。相反,我们得到纯文本的类名。我们如何设置 Eclipse 以将这些转换为指向在线 Android API 参考(最好)或本地副本(如有必要)的链接?

回答by Kevin Tighe

If you have the "Documentation for Android" package and the javadoc info still isn't showing up, make sure the Android library settings point to the right folder:

如果您有“Android 文档”包并且 javadoc 信息仍未显示,请确保 Android 库设置指向正确的文件夹:

Project -> Settings -> Java Build Path, Libraries tab

项目 -> 设置 -> Java 构建路径,库选项卡

Android X.X -> Android.jar -> Javadoc Location:
Should be something like "sdk_root/docs/reference/".

Android XX -> Android.jar -> Javadoc 位置:
应该类似于“sdk_root/docs/reference/”。

And to view the docs for a class in editor for example:

并在编辑器中查看类的文档,例如:

you should choose show attached java doc in web browser from to popup that appear when hover the cursor on some declaration.

您应该选择在 Web 浏览器中显示附加的 Java 文档从将光标悬停在某个声明上时出现的弹出窗口。

回答by ketorin

Install "Documentation for Android SDK" package using Android SDK and AVD Manager.

使用 Android SDK 和 AVD 管理器安装“Android SDK 文档”包。

回答by shareef

This answer is new and might not been available on 2010 when the question been askedAnd these docs include android SDK docs which many developers need and google app engine too

这个答案是新的,在 2010 年提出问题时可能不可用这些文档包括许多开发人员需要的 android SDK 文档和谷歌应用程序引擎

Detailed steps for the above link .. for indigo

上述链接的详细步骤.. 用于靛蓝

middle reference

中间参考