Eclipse Android项目中的JavaDoc

时间:2023-01-22 12:27:17

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引用(最好)或本地副本(如果需要)?

3 个解决方案

#1


39  

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构建路径,Libraries标签

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

Android X。X - > 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 doc,当将光标悬停在某个声明上时,从弹出窗口中弹出。

#2


9  

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

使用Android SDK和AVD Manager安装“Android SDK文档”包。

#3


3  

This answer is new and might not been available on 2010 when the question been asked And 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

中间引用

#1


39  

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构建路径,Libraries标签

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

Android X。X - > 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 doc,当将光标悬停在某个声明上时,从弹出窗口中弹出。

#2


9  

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

使用Android SDK和AVD Manager安装“Android SDK文档”包。

#3


3  

This answer is new and might not been available on 2010 when the question been asked And 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

中间引用