Reputation: 2612
My Goal: Add javadoc to a 3rd party library in Android Studio. (Specifically Parse)
My Setup: I'm using Android Studio 0.5.2 and it's a gradle setup. I stuck the jar library in the /libs folder and updated the gradle file. (Ex - It's a parse library so compile fileTree(dir: 'src/main/libs/Parse-1.5.0', include: ['.jar'])* worked.)
What I tried: I was given the documentation as a list of html files. Dropped them in the project in the libs folder and nothing worked. I then used jar cvf to create a javadoc in jar format and tried to link to it the *.jar.properties file. Still nothing worked. I know you can get javadocs working because the Android support libraries are pulling their respective javadocs.
Here are a few links of interest:
Upvotes: 1
Views: 1351
Reputation: 31
That is working
Problem is that this xml file is generated by gradle. So if you sync your project with gradle files you will lose your changes. So don't forget to add it again.
Is there any way to avoid that ?
Upvotes: 3
Reputation: 26
you can find path-settings in [project > .idea > libraries]
if you add 'Parse-1.5.0' library, [project > .idea > libraries] directory have Parse_1_5_0.xml file.
insert java-doc and source file to app > libs then edit Parse_1_5_0.xml file.
<component name="libraryTable">
<library name="Parse-1.5.0">
<CLASSES>
<root url="jar://$PROJECT_DIR$/app/libs/Parse-1.5.0.jar!/" />
</CLASSES>
<JAVADOC>
<root url="jar://$PROJECT_DIR$/app/libs/Parse-1.5.0-javadoc.jar!/" />
</JAVADOC>
<SOURCES>
<root url="jar://$PROJECT_DIR$/app/libs/Parse-1.5.0-sources.jar!/" />
</SOURCES>
</library>
</component>
Upvotes: 1