error: package com.sun.javadoc does not exist

错误码

external/doclava/src/com/google/doclava/ClassInfo.java:20: error: package com.sun.javadoc does not exist
import com.sun.javadoc.ClassDoc;
external/doclava/src/com/google/doclava/apicheck/XmlApiFile.java:80: error: cannot find symbol
      ClassDoc classDoc = null;
      ^
  symbol:   class ClassDoc
  location: class XmlApiFile
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
163 errors
make: *** [out/host/common/obj/JAVA_LIBRARIES/doclava_intermediates/javalib.jar] Error 41
  • The following was my fix in OSX. You have to see what JVMs you have and set it appropriately.
export ANDROID_JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.7.0_51.jdk/Contents/Home
  • Below is what removed these errors in my case. An offending extraneous ‘/’ at the end.
    bad:
export PATH=/home/rev/BIN/jdk-6u34/jdk1.6.0_34/bin/:$PATH

Good:

export PATH=/home/rev/BIN/jdk-6u34/jdk1.6.0_34/bin:$PATH

From stackoverflow.com

你可能感兴趣的:(android)