Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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.

like image 789
pjcard Avatar asked Apr 16 '12 14:04

pjcard


1 Answers

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"/>
like image 72
eriuzo Avatar answered Nov 15 '22 06:11

eriuzo