Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to add javadoc for android to Netbeans

I just started using Net Beans. I am wanting to try my hand at developing android apps. I got the android sdk downloaded and everything is working well. I can create little apps and run them in the emulator. However, the intelisense popup for the android methods says that the Javadoc isn't found. Is there a way to add it?

like image 621
Mr Bell Avatar asked Jul 23 '10 18:07

Mr Bell


People also ask

How to install Javadoc in netbeans?

Choose Tools > Java Platform Manager from the main window. Select the platform to which you want to add Javadoc in the left panel of the dialog box. In the Javadoc tab, click Add ZIP/Folder and specify the location of the Javadoc files. Click Close.

How do I write Javadoc comments in Netbeans?

Right-click on a source package and select Tools > Analyse Javadoc. This will add Javadoc to all methods. Type /** on the line before a class, method or field declaration, and then press Enter. Default Javadoc will be created for that method.


2 Answers

The best way as below steps in NetBeans 7:

  1. Tools --> Ant Libraries.
  2. New library --> Name it Android.
  3. Classpath --> Add JAR/Folder --> {SDK Folder}\platforms\android-16\android.jar (in short find android.jar and use it's path, for me I'm using 16 version).
  4. Javadoc --> Add ZIP/Folder --> {SDK Folder}\docs\references (important note: you may get error in above step, so search will not work. To solve it, copy the file index.html inside [references folder] to a new file and called index-all.html. Then re-add the path in step 4).

Source: Here

like image 67
Ayman Al-Absi Avatar answered Sep 19 '22 20:09

Ayman Al-Absi


Take a look at the Android Sources provided by adt-addons. This eclipse plugin will download all of the sources and attach them automatically.

If you aren't using Eclipse, you can still download the source zips from the jar at http://adt-addons.googlecode.com/svn/trunk/source/com.android.ide.eclipse.source.update/plugins/

Extract the jar file and inside you'll find source zips for each platform revision. Attach these to your IDE.

Otherwise, you can check out the sources manually from git but this is a rather lengthy and arduous process to achieve the above.

like image 44
David Snabel-Caunt Avatar answered Sep 21 '22 20:09

David Snabel-Caunt