新版本的ADT r17插件为Eclipse添加了自动设置JAR依赖项的功能。/libs文件夹中的任何.jar文件现在都被添加到构建配置中。不幸的是,Android依赖类路径容器是不可修改的。
如何将javadoc和源代码附加到自动插入的.jar(从/libs文件夹)?
新版本的ADT r17插件为Eclipse添加了自动设置JAR依赖项的功能。/libs文件夹中的任何.jar文件现在都被添加到构建配置中。不幸的是,Android依赖类路径容器是不可修改的。
如何将javadoc和源代码附加到自动插入的.jar(从/libs文件夹)?
当前回答
只需更新ADT插件。这对我很管用!!
Start Eclipse, then select Help > Install New Software. Click Add, in the top-right corner. In the Add Repository dialog that appears, enter "ADT Plugin" for the Name and the following URL for the Location: https://dl-ssl.google.com/android/eclipse/ Note: The Android Developer Tools update site requires a secure connection. Make sure the update site URL you enter starts with HTTPS. Click OK. In the Available Software dialog, select the checkbox next to Developer Tools and click Next. In the next window, you'll see a list of the tools to be downloaded. Click Next. Read and accept the license agreements, then click Finish. If you get a security warning saying that the authenticity or validity of the software can't be established, click OK. When the installation completes, restart Eclipse
希望有帮助!
其他回答
答案来自http://code.google.com/p/android/issues/detail?id=27490#c21
在你的libs文件夹中,你必须有:
doc(folder)
foo_doc(folder)
index.html
...
...
foo.jar
foo.jar.properties
在你的罐子里。属性,只需输入doc=./doc/foo_doc
也许你将不得不刷新你的项目,清理它,关闭它并重新打开它。
这对我很管用!
只需更新ADT插件。这对我很管用!!
Start Eclipse, then select Help > Install New Software. Click Add, in the top-right corner. In the Add Repository dialog that appears, enter "ADT Plugin" for the Name and the following URL for the Location: https://dl-ssl.google.com/android/eclipse/ Note: The Android Developer Tools update site requires a secure connection. Make sure the update site URL you enter starts with HTTPS. Click OK. In the Available Software dialog, select the checkbox next to Developer Tools and click Next. In the next window, you'll see a list of the tools to be downloaded. Click Next. Read and accept the license agreements, then click Finish. If you get a security warning saying that the authenticity or validity of the software can't be established, click OK. When the installation completes, restart Eclipse
希望有帮助!
我的解决方案:
下载一个名为“Java Source Attacher Feature”的eclipse插件。
稍后,选择一个jar并使用这个插件附加源代码。点击jar文件来选择它,鼠标右键,然后选择“附加java源代码”。
有了源代码,就自动有了javadoc。
现在可以在类上使用F2来查看相关的javadoc。
享受
现在,将您想要Javadoc的库移动到lib。他们将该库添加到构建路径并添加Javadoc。
在android问题中检查此评论。
在windows中,你必须转义指向属性文件中doc和src路径的反斜杠。的例子, Android-support-v4.jar的属性文件内容如下:
doc=C:\\Program Files (x86)\\Android\\android-sdk\\extras\\android\\support\\v4\\docs
src=C:\\Program Files (x86)\\Android\\android-sdk\\extras\\android\\support\\v4\\src