I am trying to generate javadocs for a larger android project - using android studios built-in "Tools > Generate JavaDoc". I have tried different scopes (my module, a custom scope containing only the java files I created, Project Files, ...) but everytime there is a class included which uses import com.my-app.R;
or a generated class such as SomeFragmentBinding
for ViewBinding, I get an
error: cannot find symbol
from javadoc...
Apart from this problem the usual building and executing of the app is completely successful and works like a charm, although I get some some warnings regarding my database layout. Also I am using Hilt for Dependency Injection, but I don't really think that is related?
Now I am a complete noob using gradle and my attempts to configure the javadoc task myself have failed - and from what I have found online this should generally work out-of-the-box.
Had the same issue. Here is how I solved it:
In your build.gradle file, add this line
implementation files(pathtosdk)
Go to Tools -> Generate Javadocs. In the command line args, add this line
-sourcepath pathtosdk
To find the pathtosdk;