javadoc 中的参考资源

发布于 2024-12-23 16:44:22 字数 49 浏览 3 评论 0原文

是否可以在javadoc中引用资源文件(例如布局文件)?我在开发者文档中找不到这个。

Is it possible to reference resource files (e.g. layout files) in javadoc? I could not find this in the developer docs.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

微凉徒眸意 2024-12-30 16:44:22

是的,

在您的 javadoc 中:{@link com.yourApp.R.layout#layoutName}

Yup it is,

In your javadoc: {@link com.yourApp.R.layout#layoutName}

属性 2024-12-30 16:44:22

我使用了 #

{@link R.layout#dialog_player_info}

而不是

{@link R.layout.dialog_player_info}

现在一切正常了。在我在 Android Studio 中收到此错误之前

Cannot resolve symbol 'R.layout.dialog_player_info' less... (Ctrl+F1) 
This inspection points out unresolved references inside javadoc

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
丢了幸福的猪 2024-12-30 16:44:22

是的,但整个过程可能涉及

  • 创建一个临时文件夹
  • 将源文件复制到此临时文件夹
  • 将布局文件复制到此文件夹(可能在 doc-files 子文件夹中
  • 从此临时文件夹运行 Javadoc 命令

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
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文