具体问题描述:

Execution failed for task ':UIWidget:androidJavadocs'.
> Javadoc generation failed. Generated Javadoc options file (useful for troubleshooting): '/Users/aria/dev/android/work_space/KeepassLib/UIWidget/build/tmp/androidJavadocs/javadoc.options'

* Try:
Run with --stacktrace option to get the stack trace. Run with --debug option to get more log output. Run with --scan to get full insights.

javadoc: ?? - ???????: /Users/aria/dev/android/sdk/docs/reference/element-list

原因:

Android doc 打包设置了linksOffline选择项,并将其指向了sdk目录的docs/reference

image-20210614131548335

但是docs/reference在Android Studio 4.0 以上已经被删除了,Sdk tool上也无法下载Documentation for Android SDK

No documentation in Android Studio 4.0.1 (Linux Mint) - Stack Overflow

解决

  • linksOffline屏蔽去掉