Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android Studio: How to attach javadoc

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 search result just tells about adding android documentation or adding javadoc in eclipse. That's not What I am looking for!

like image 795
Ashish Bindal Avatar asked Jan 08 '14 11:01

Ashish Bindal


People also ask

How do you add a Javadoc code?

Place the caret at the declaration in the editor, press Alt+Enter , and select Add Javadoc from the list.

How do I add a Javadoc to a class?

provide version of the class, interface or enum. Select “Generate JavaDoc” option from Project menu and a wizard will appear. Specify the location for the JavaDoc file on your computer, by default it will be in the C drive. Select the project and then the packages for which you want to create the JavaDoc file.

How do I access Javadoc?

Finding the Javadoc To locate the Javadoc, browse to your User folder (on Windows 7 this is C:\Users\*Username*), then browse to sunspotfrcsdk/doc/javadoc. Double click on the index. html file to open it in your default webbrowser.


1 Answers

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

suppose:

  1. your lib name is: libxxx.jar
  2. javadoc name is docs.zip

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

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

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

like image 163
Jason Qi Avatar answered Sep 20 '22 08:09

Jason Qi