Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Problems with javadoc

When I start a new android project and use native android methods and components and java methods and components, I can't read their description because javadoc send me this message:

Note: This element has no attached source and the Javadoc could not be found in the attached Javadoc.

I have the latest android documentation in my android-sdk folder and javadoc works when I work with standard java projects, but not with android project. Have you got any ideas why does it happen and how can I fix this issue?

like image 862
teoREtik Avatar asked Feb 12 '11 19:02

teoREtik


People also ask

How do I fix Javadoc errors?

You need to call mvn javadoc:fix to fix main Java source files (i.e. inside src/main/java directory) or mvn javadoc:test-fix to fix test Java source files (i.e. inside src/test/java directory).

Is Javadoc still used?

Fortunately, all modern versions of the JDK provide the Javadoc tool – for generating API documentation from comments present in the source code.

Should you Javadoc private methods?

Nope, you shouldn't write javadoc for private methods. End users don't have access to private fields or methods so there really isn't a point in providing javadoc for them. Private fields and methods are only meant for the developer. If you really need to though, feel free to write comments for non-obvious logic.


1 Answers

I found solution myself. In this situation you need to correct a path of your javadoc at Project->Properties->Java Build path->AndroidX.X(where X.X is platform version)->android.jar->Javadoc location.

It should be pointed at your docs\reference location

like image 143
teoREtik Avatar answered Oct 12 '22 12:10

teoREtik