Android Studio:如何附加 javadoc

Android Studio:如何附加 javadoc

问题描述:

这可能是一个非常微不足道的问题,但我找不到任何选项可以在 android 项目中将 javadoc/source 与本地 jar 依赖项(在 libs 文件夹中)附加在一起.我简直不敢相信我在这么简单的事情上花了一个小时:(

It might be very trivial question, But I couldn't find any option to attach javadoc/source with local jar dependencies (in libs folder) in android project. I can't believe I have spent a hour on such simple stuff :(

Google 搜索结果只是说明在 Eclipse 中添加 android 文档或添加 javadoc.这不是我要找的!

Google search result just tells about adding android documentation or adding javadoc in eclipse. That's not What I am looking for!

我刚刚找到了一个解决方案,因为我很长时间没有找到任何其他解决方案.

I found a solution just now since I can't find any other solution for a long time.

假设:

  1. 你的库名是:libxxx.jar
  2. javadoc 名称是 docs.zip

在.idea/libraries文件夹下,可以找到libxxx.xml.用

under folder .idea/libraries, you can find libxxx.xml. replace JAVADOC with

<JAVADOC>
  <root url="jar://C:/yourpath/doc.zip!/" />
</JAVADOC>

然后 ctrl+alt+y 同步项目.(不要执行Sync Project with Gradle files",它会删除更改)

then ctrl+alt+y to sync the project. (Don't do "Sync Project with Gradle files", it will delete the changes)