I have written a fully functional Android app in Intellij, using JDK 11 and Android SDK 28. But I am unable to run JavaDoc on my code, and I can’t figure out why or how to fix it! At first, I was getting many errors such as "android.whatever package not found"
. Simple enough to fix, after googling I found I need to add -bootclasspath pathtomyandroidsdkjarfile to the “extra command line options” section, and that fixes the problem for everyone else. But when I add that line, I get the following error:
error: option --boot-class-path not allowed with target 11
I’m not sure what “target 11” means, but I think I can infer it means the JDK 11. So, I’ve got no idea where to go from here. Any help anyone can provide would be greatly appreciated!
Advertisement
Answer
So after trying a bunch of variations at random, I think I’ve solved it. It seems like in JDK 10+ the -bootclasspath argument has been deprecated, and has been rolled in together with the -sourcepath argument. So by putting -sourcepath pathtomyandroidsdkjarfile
in the “Extra command line options” section, I managed to fix the issue.