2

我已经记录了我的代码,现在想要在我的项目根目录的 doc 目录中生成 Javadoc。

问题?每当我尝试生成时,所有显示的都是根目录中的一个空目录。

这是错误:第一个错误已修复!必须将 JRE 添加到我的环境变量中。

warning: [options] bootstrap class path not set in conjunction with -source 1.6

现在这是问题:

Loading source files for package com.example.worldfriends...
Loading source files for package com.example.json...
Loading source files for package com.google.android.gms...
Loading source files for package com.example.util...
Constructing Javadoc information...
C:\Programming\workspace\worldfriends\src\com\example\worldfriends\CustomMapFragment.java:8: error: package android.graphics does not exist
import android.graphics.Bitmap;
                   ^
C:\Programming\workspace\worldfriends\src\com\example\worldfriends\CustomMapFragment.java:9: error: package android.graphics.drawable does not exist
import android.graphics.drawable.BitmapDrawable;
                                ^
C:\Programming\workspace\worldfriends\src\com\example\worldfriends\CustomMapFragment.java:10: error: package android.os does not exist
import android.os.Bundle;
                 ^
C:\Programming\workspace\worldfriends\src\com\example\worldfriends\CustomMapFragment.java:11: error: package android.view does not exist
import android.view.LayoutInflater;

C:\Programming\workspace\worldfriends\src\com\example\worldfriends\CustomMapFragment.java:63: error: cannot find symbol
    public View onCreateView(LayoutInflater layoutInflator, ViewGroup viewGroup, Bundle bundle) {
                             ^
  symbol:   class LayoutInflater
  location: class CustomMapFragment

之后还有几行。

尝试添加以下配置 Javadoc 参数后:

-classpath "C:\Programming\adt-bundle-windows-x86_64-20130917\sdk\platforms\android-19\android.jar"

我收到此错误:

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

在 Stackoverflow 上四处寻找后发现了这个线程:Javadoc in Eclipse failed to identify packages

回答:

This Works in Eclipse for me:

Projekt --> generate Javadoc
Go to "Configure Javadoc arguments."
in VM options add "-bootclasspath /path/to/sdk/platforms/android-##/android.jar"
4

0 回答 0