I'm working on an Android project (Java) and I want to generate Javadoc for my classes using the "Generate Javadoc..." option in Android Studio.
I checked the "Include JDK and library sources in -sourcepath" option but I get this error :
C:\Users\...\.gradle\caches\modules-2\files-2.1\.jetbrains.kotlinx\kotlinx-coroutines-android\1.7.3\3aeb4365c53ed4e61a9caf0778c108352f23507b\kotlinx-coroutines-android-1.7.3-sources.jar(/module-info.java):5: error: module not found: kotlin.stdlib
requires kotlin.stdlib;
^
C:\Users\...\.gradle\caches\modules-2\files-2.1\.jetbrains.kotlinx\kotlinx-coroutines-android\1.7.3\3aeb4365c53ed4e61a9caf0778c108352f23507b\kotlinx-coroutines-android-1.7.3-sources.jar(/module-info.java):6: error: module not found: kotlinx.coroutines.core
requires kotlinx.coroutines.core;
^
error: cannot access module-info
cannot resolve modules
3 errors
I tried to uncheck the option or change the -sourcepath manually, but then I got new errors like :
error: package android.os does not exist
error: cannot access ...
It seems like it doesn't access the Android packages with that option.
I'm working on an Android project (Java) and I want to generate Javadoc for my classes using the "Generate Javadoc..." option in Android Studio.
I checked the "Include JDK and library sources in -sourcepath" option but I get this error :
C:\Users\...\.gradle\caches\modules-2\files-2.1\.jetbrains.kotlinx\kotlinx-coroutines-android\1.7.3\3aeb4365c53ed4e61a9caf0778c108352f23507b\kotlinx-coroutines-android-1.7.3-sources.jar(/module-info.java):5: error: module not found: kotlin.stdlib
requires kotlin.stdlib;
^
C:\Users\...\.gradle\caches\modules-2\files-2.1\.jetbrains.kotlinx\kotlinx-coroutines-android\1.7.3\3aeb4365c53ed4e61a9caf0778c108352f23507b\kotlinx-coroutines-android-1.7.3-sources.jar(/module-info.java):6: error: module not found: kotlinx.coroutines.core
requires kotlinx.coroutines.core;
^
error: cannot access module-info
cannot resolve modules
3 errors
I tried to uncheck the option or change the -sourcepath manually, but then I got new errors like :
error: package android.os does not exist
error: cannot access ...
It seems like it doesn't access the Android packages with that option.
Share Improve this question asked Mar 27 at 11:02 Mattin GUIHENEUFMattin GUIHENEUF 11 bronze badge1 Answer
Reset to default 0Possible solutions:
Custom scope:
Select "Custom scope" in the "Generate Javadoc..." settings, you restrict Javadoc to processing only your project's source code. This isolates Javadoc from the conflicting external library dependencies.
"-exclude" flag:
The "-exclude" flag, when added to the "Command line arguments" field, provides control over which packages are excluded.
For example, "-exclude .jetbrains.kotlinx.*" prevents Javadoc from processing any packages within the ".jetbrains.kotlinx" namespace.