Is it possible to reference resource files (e.g. layout files) in javadoc? I could not find this in the developer docs.
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
Yup it is,
In your javadoc: {@link com.yourApp.R.layout#layoutName}
回答2:
I've used #
{@link R.layout#dialog_player_info}
instead of a dot
{@link R.layout.dialog_player_info}
And now it's all OK. Before I was getting this error in Android Studio
Cannot resolve symbol 'R.layout.dialog_player_info' less... (Ctrl+F1)
This inspection points out unresolved references inside javadoc
回答3:
Yes, but the whole process may involve
- creating a temp folder
- copy your source files into this temp folder
- copy your layout files into this folder (possibly in a doc-files subfolder)
- running the Javadoc command from this temp folder