如何在Eclipse中的Android软件包中查看库依赖的源或javadoc? [英] How do I see source or javadocs for a library dependency in an Android package in Eclipse?

查看:192
本文介绍了如何在Eclipse中的Android软件包中查看库依赖的源或javadoc?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在Eclipse中有两个包^。一个被标记为一个库,另外一个引用它(在属性 - > Android下),如下所述: http://developer.android.com/guide/developing/projects/projects-eclipse.html



我的问题是当我将鼠标悬停在指向引用的项目eclipse的一些代码上时显示


此元素没有附加的javadoc,而javadoc不能在附件源中找到


此外,当在所述代码的上下文菜单中选择打开声明时,它将打开相关联的。 class(而不是.Java)与乱码


此类文件的JAR属于容器Android依赖关系允许在包资源管理器中的条目


^根节点修改源附件,所以我假设他们被称为包,而不是项目。这两个都不是罐子。

解决方案

这应该是在最新的adt版本中修复的,但是如果有人还有这个问题,我,这是我做的:



我将库的项目的.classpath文件中的src的顺序切换到这个(注意,path =src必须是在第一行)

 < classpathentry kind =srcpath =src/> 
< classpathentry kind =srcpath =gen/>


I have two packages^ in Eclipse. One is marked as a Library and the other references it (under properties->Android), as described here: http://developer.android.com/guide/developing/projects/projects-eclipse.html

My problem is that when I hover the mouse over some code referring to the referenced project eclipse displays

"This element has no attached javadoc and the javadoc could not be found in the attached source"

Furthermore when I select "Open Declaration" in the context menu for said code, it opens the associated .class (instead of the .Java) with the messsage

"The JAR of this class file belongs to container 'Android Dependencies' which does not allow modifications to source attachments on entries"

^ root nodes in the Package Explorer, so I assume they're called packages and not projects. Neither of them are jars.

解决方案

this should have been fixed in latest adt version, but in case someone still have this problem like me, here's what i did:

I switched the order of src in .classpath file of my library projects, to this (note that the path="src" must be in the first line)

<classpathentry kind="src" path="src"/>
<classpathentry kind="src" path="gen"/>

这篇关于如何在Eclipse中的Android软件包中查看库依赖的源或javadoc?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆