简体   繁体   English

我在Eclipse中看不到Android SDK javadoc

[英]I can't see Android SDK javadoc in Eclipse

I am developing for Android in Eclipse Helios. 我正在Eclipse Helios中为Android开发。 I'm using the latest ADT plugin 8.0.1. 我正在使用最新的ADT插件8.0.1。 Previously, I could see method javadoc description, when moving my mouse over a method name and waiting for about a second. 以前,当我将鼠标移到方法名称上并等待大约一秒时,我可以看到方法javadoc描述。 Now it stopped working for some reason. 现在它因某种原因停止了工作。

  1. In eclipse, right click on your Android project and select Properties 在eclipse中,右键单击您的Android项目并选择Properties
  2. On the menu on the left, select "Java Build Path" 在左侧菜单中,选择“Java Build Path”
  3. On the right hand side, select the "tab" labelled "Libraries". 在右侧,选择标有“库”的“标签”。
  4. Here you should see the Android SDK that you're targeting. 在这里,您应该会看到您要定位的Android SDK。 For example: "Android 2.2". 例如:“Android 2.2”。
  5. Click on the arrow to the left of the Android SDK to expand the sublevels. 单击Android SDK左侧的箭头以展开子级别。
  6. Find "Android.jar" and click on the arrow to the left of that one as well to expand it. 找到“Android.jar”并单击该左侧的箭头以展开它。
  7. You'll see a setting called "Javadoc location". 您将看到一个名为“Javadoc location”的设置。 Select that and then click on the "Edit" button. 选择该选项,然后单击“编辑”按钮。
  8. At the top, RESELECT the path to your javadocs. 在顶部,重新连接到javadocs的路径。 This is usually "path_to_android_sdk/android-sdk-mac_86/docs/reference/". 这通常是“path_to_android_sdk / android-sdk-mac_86 / docs / reference /”。 I say RESELECT because even if it's right, you should browse and do it over anyway. 我说RESELECT是因为即使它是正确的,你也应该浏览并完成它。
  9. Click on "validate". 点击“验证”。 You should be all set now! 你现在应该全部准备好了!

As it is told in this article http://hacksoflife.blogspot.com/2011/02/losing-javadocs-in-eclipse-solution.html Thanks to Chris 正如本文中所述http://hacksoflife.blogspot.com/2011/02/losing-javadocs-in-eclipse-solution.html感谢Chris

For some reason it is adding an static windows OS path starting with D:\\... This also correct all SDK targets. 由于某种原因,它添加了一个以D:\\ ...开头的静态Windows操作系统路径。这也纠正了所有SDK目标。

Eclipse Helios is known to have slow code completion with the Android SDK. 众所周知,Eclipse Helios使用Android SDK完成代码缓慢。 Perhaps your problems are related to that? 也许你的问题与此有关? If you have problems with the latest Eclipse version, you should probably try using Eclipse 3.5 http://www.eclipse.org/galileo/ , which doesn't have these issues. 如果您遇到最新的Eclipse版本问题,您应该尝试使用Eclipse 3.5 http://www.eclipse.org/galileo/ ,它没有这些问题。

This could be due to some sort of temporary error in Eclipse. 这可能是由于Eclipse中的某种临时错误。

You can check Window -> Show View (-> General ) -> Error Log to check whether there has been an Eclipse exception which has caused the Eclipse designer to bail out. 您可以检查窗口 - >显示视图( - >常规) - >错误日志以检查是否存在导致Eclipse设计者纾困的Eclipse异常。

Have you tried to restart Eclipse? 你试过重启Eclipse吗? If it still doesn't work you can try to restart eclipse with 如果它仍然不起作用,你可以尝试重新启动eclipse

c:\\path\\to\\eclipse.exe -clean c:\\ path \\ to \\ eclipse.exe -clean

You can also check the Windows-Preferences and Project->Properties if you can find anything related to Javadoc there and try to reset the java perspective using Window -> Reset perspective. 如果您可以在那里找到与Javadoc相关的任何内容并尝试使用Window - > Reset透视图重置java透视图,也可以检查Windows-Preferences和Project-> Properties。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM