How do I see source or javadocs for a library dependency in an Android package in Eclipse?

不羁的心 提交于 2019-12-07 04:29:00

问题


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.


回答1:


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"/>



回答2:


If you right click on a jar file, you can go to the properties menu. In that there is javadoc location option on the side which allows u to specify the path. Might work for the library project too.



来源:https://stackoverflow.com/questions/10175624/how-do-i-see-source-or-javadocs-for-a-library-dependency-in-an-android-package-i

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!