Javadoc generation for Android

天涯浪子 提交于 2020-01-04 08:07:42

问题


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.


回答1:


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"



回答2:


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



来源:https://stackoverflow.com/questions/14793161/javadoc-generation-for-android

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!