简体   繁体   English

如何在Eclipse中的Android包中查看库依赖项的源代码或javadoc?

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

I have two packages^ in Eclipse. 我在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 一个被标记为库,另一个被引用(在属性 - > Android下),如下所述: 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 我的问题是,当我将鼠标悬停在某些代码上时,引用了eclipse显示的引用项目

"This element has no attached javadoc and the javadoc could not be found in the attached source" “此元素没有附加的javadoc,并且在附加的源中找不到javadoc”

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 此外,当我在上下文菜单中为所述代码选择“打开声明”时,它会打开关联的.class(而不是.Java)与messsage

"The JAR of this class file belongs to container 'Android Dependencies' which does not allow modifications to source attachments on entries" “此类文件的JAR属于容器'Android Dependencies',它不允许修改条目上的源附件”

^ root nodes in the Package Explorer, so I assume they're called packages and not projects. 在Package Explorer中的^根节点,所以我假设它们被称为包而不是项目。 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: 这应该是在最新的adt版本中修复的,但是如果有人像我一样有这个问题,这就是我做的:

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) 我在我的库项目的.classpath文件中切换了src的顺序到这个(请注意,path =“src”必须在第一行)

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

If you right click on a jar file, you can go to the properties menu. 如果右键单击jar文件,则可以转到属性菜单。 In that there is javadoc location option on the side which allows u to specify the path. 因为侧面有javadoc位置选项,允许你指定路径。 Might work for the library project too. 也可能为图书馆项目工作。

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

相关问题 如何在Eclipse中附加Android支持库源代码? - How do I attach the Android Support Library source in Eclipse? 如何在Eclipse Juno中为Android配置Javadocs - How to configure Javadocs for Android in Eclipse Juno 如何从Eclipse上的包创建android库? - How to create an android library from a package on eclipse? 我如何进入Android源文件以通过Eclipse进行调试 - How do I step into the Android source files for debugging via eclipse 在Eclipse中,如何从使用它的项目源快速访问“android库项目”的源代码? - In Eclipse, how can I quickly access the source of an “android library project” from the source of a project that uses it? 如何告诉Eclipse不要打包JUnit和JMock for Android应用程序? - How do I tell Eclipse to not package JUnit and JMock for Android app? 如何将android库(作为Angle)链接到我的Eclipse项目? - How do I link android library (as Angle) to my Eclipse project? Android Studio 3:如何将源代码库导入项目 - Android Studio 3: how do I import a source code library into a project 如何在Eclipse中查看软件包的源代码? - How can I see the source code of packages in Eclipse? Android Studio JavaDocs不生成 - Android Studio JavaDocs do not generate
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM