javaandroidjavadoc

Unable to generate Android Javadoc documentation in Latest Android Studio Giraffe


I have tried every single solution available on the internet trying to generate Javadoc in the latest versions of Android Studio, everytime I get the same "package does not exist", import errors and finally without generating any documentation this error is thrown "100 errors. "javadoc" finished with exit code 1,

I am on Mac OS

enter image description here

What I tried so far as per the solutions given,

Tried everyting mentioned here

Also tried the solutions here

Things I have followed in the above solutions,

Replaced .R import with .* Added dependency

implementation fileTree(dir: '/Users/Varaprasad/Library/Android/sdk/platforms/android-33', include: ['*.aar', '*.jar'], exclude: [])

used in command line arguments -encoding utf-8 -sourcepath /Users/Varaprasad/Library/Android/sdk/platforms/android-33

Generating Java Doc for specific classes

Also tried with unchecking the option "Include JDK library sources in -sourcepath" & changing scopes too.

From the above solutions, it was clear there was only one thing - to add the jar dependency. I did it absolutely correct, but with no results. Finally it is the same "100 errors. "javadoc" finished with exit code 1, no matter how many times I try.

No documentation is generated. The output folder is empty.

Please see the log file here: Generating Doc Error Log

Cannot generate the same with even new projects too with just a simple "MainActivity.java" and an activity_main.xml file.

Also tried, the solutions that were posted - to add tasks in build.gradle which didn't work in my case.

My Project has kotlin data classes, 1 Util class (with utility methods), along with Java classes - as a part of optimization. This doesn't seem to be a problem.

This was as far as I can reach, no where the solutions seems to be working.

Any help would be greatly appreciated.


Solution

  • I installed gradle in my mac, terminal where my project is located. Using,

    $ brew install gradle

    Then I created a task that generates the Javadocs by ignoring the package errors. @Julian's answer here helped me alot...

    Then run the task using the below command in terminal,

    gradle generateReleaseJavadoc

    And there I can finally see the docs generated in the destination folder.