0

I read all posts that answer this question but they all are old and didn't work for me. Is there any way to just attach source code to the Support Library (v4, v7, app_compat..) in Eclipse and avoid seeing the message "This element neither has attached source nor attached Javadoc and hence no Javadoc could be found. note"?

Somebody told me there is no way to do it since it is closed source, is that true? Since there is nothing under the library's source folder.

Thanks.

Iewicz
  • 193
  • 8

2 Answers2

1

Here is what solved the problem for me. My project depends on appcompat_v7 library, which (I think) provides the android-support-v4.jar file to the project. I created android-support-v4.jar.properties file exactly as guided in How can I enable javadoc for the Android support library?. Added that file to lib folder in appcompat_v7 rather than project's lib folder.enter image description here

Community
  • 1
  • 1
Rban
  • 24
  • 4
0

Try this one:

1) Download jar file containing the JavaDocs.
2) Open the Build Path page of the project (right click, properties, Java build path). 3) Open the Libraries tab.
4) Expand the node of the library in question (JavaFX). 5) Select JavaDoc location and click edit.
6) Enter the location to the file which contains the Javadoc (the one you just downloaded).

Hope this helps.

Source: How to attach source or JavaDoc in eclipse for any jar file e.g. JavaFX?

UPDATE: If you don't have javadocs itself, you can generate them by yourself:

cd <path_to_android_sdk>/extras/android/compatibility/v4/
mkdir docs
javadoc -d docs -sourcepath src\java -subpackages android.support.v4

Source: How to install javadoc for Android Compatibility Package?

Community
  • 1
  • 1
krossovochkin
  • 12,030
  • 7
  • 31
  • 54
  • I know HOW to attach, the problem is that i don't know WHERE the source code/javadoc is. – Iewicz Apr 23 '14 at 12:16
  • Sorry, but your question is: "How to attach source code.." and not "where I can get javadocs to android support library". And in your question there is no word that you don't have javadocs itself. So I think, your claim is inappropriate. I updated my answer. – krossovochkin Apr 23 '14 at 12:58
  • I've done that and i get **javadoc: error - No public or protected classes found to document. 1 error** – Iewicz Apr 23 '14 at 18:21
  • May be instead of "android/compatibility/v4/" should be "android/support/v4/". To ensure, look at this folder, there should be android_support_v4.jar and "src" folder. In "src" folder should be "java" folder. If you don't have "src" folder there, the only thing I can suggest to you – update Android Support Lib in Android SDK Manager. I don't do anything special - "src" folder with content was downloaded automatically with android_support_library – krossovochkin Apr 24 '14 at 08:03
  • That wasn't the problem. Solution is what @Thrakbad suggested. – Iewicz Apr 24 '14 at 09:28