在尝试为我的项目生成java文档时,我遇到以下异常。
构建Javadoc信息...... 1错误
com.sun.tools.javac.util.FatalError: Fatal Error: Unable to find package java.lang in classpath or bootclasspath
at com.sun.tools.javac.comp.MemberEnter.importAll(MemberEnter.java:142)
at com.sun.tools.javac.comp.MemberEnter.visitTopLevel(MemberEnter.java:522)
at com.sun.tools.javac.tree.JCTree$JCCompilationUnit.accept(JCTree.java:459)
at com.sun.tools.javac.comp.MemberEnter.memberEnter(MemberEnter.java:401)
at com.sun.tools.javac.comp.MemberEnter.complete(MemberEnter.java:876)
at com.sun.tools.javac.code.Symbol.complete(Symbol.java:421)
at com.sun.tools.javac.code.Symbol$ClassSymbol.complete(Symbol.java:821)
at com.sun.tools.javac.comp.Enter.complete(Enter.java:491)
at com.sun.tools.javac.comp.Enter.main(Enter.java:469)
at com.sun.tools.javadoc.JavadocEnter.main(JavadocEnter.java:71)
at com.sun.tools.javadoc.JavadocTool.getRootDocImpl(JavadocTool.java:177)
at com.sun.tools.javadoc.Start.parseAndExecute(Start.java:387)
at com.sun.tools.javadoc.Start.begin(Start.java:167)
at com.sun.tools.javadoc.Main.execute(Main.java:59)
at com.sun.tools.javadoc.Main.main(Main.java:49)
javadoc: error - fatal error
现在我已经在线搜索并将rt.jar添加到bootclasspath中,但异常仍然存在。
我的bootclasspath
-bootclasspath $JAVA_HOME/jre/lib/rt.jar;/Users/dsg234/Library/Android/sdk/android-19/android.jar
对此任何其他解决方案,可能是一些命令行命令为android项目生成java doxs。我使用的是Android Studio 1.5.1