gradle – How to generate JavaDoc for android application?-ThrowExceptions

Exception or error:

I am trying to generate javadoc for android application using a command or a gradle task.
I tried this command:

javadoc -protected -splitindex  -bootclasspath /Users/[username]/Library/Android/sdk/platforms/android-29/android.jar -Xdoclint:none -sourcepath app/src/main/java -subpackages .

And the result was:

error: package does not exist

Also I’ve tried tasks like this :

task createJavadocs (type: Javadoc) {
    source =
    options.linkSource true
    classpath += project.files(
    failOnError false  

Which gives the same output.

How to solve:

Leave a Reply

Your email address will not be published. Required fields are marked *