Jan Oelker
Jan Oelker

Reputation: 884

Javadoc generation for Android

I am trying to generate my documentation for my android project with javadoc. The problem is that javadoc isn't able to find the android package. My error is the same as this one. If I am trying the first solution it says:

javadoc: error - The -classpath option may be specified no more than once.

What am I doing wrong?

Furthermore, I tried this solution, but I dont know what I have to do at the last step.

Upvotes: 2

Views: 1098

Answers (2)

Cheeseminer
Cheeseminer

Reputation: 3068

I've found you can add multiple paths to -classpath by separating them with semi-colons and enclosing the whole in quotes (in case of spaces in paths)

-classpath ".;c:\full\path\to\another\codebase\java;C:\path\to\android.jar"

Upvotes: 1

Jan Oelker
Jan Oelker

Reputation: 884

Okay, I solved the problem with this solution. All I needed to do is to install Cygwin. After it was installed, I needed to install ANT on Cygwin like this. Afterwards, I had to configure java in Cygwin.

And now a new detail for me(maybe the reason why the -classpath command didn't worked for me in the third step of Generate Javadoc in Eclipse). I had to open the javadoc.xml and saw this line:

<javadoc [...] additionalparam="-classpath C:\Progra~2\Android\android-sdk\platforms\android-10\android.jar" classpath="C:\Program Files (x86)\Android\android-sdk\tools\support\annotations.jar" [...]/>

The additionalparam is my own of the third step of Generate Javadoc. I took that path and put it into the classpath="" ... That's it. Maybe someone could say how to configure the classpath in Eclipse manually, because I couldn't find something.

Allright, now switched to the folder of the javadoc.sh and run that file with sh javadoc.sh

Upvotes: 0

Related Questions