Android 8.0 源码编译报错:
java.lang.UnsupportedClassVersionError: com/google/doclava/Doclava : Unsupported major.minor version 52.0
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:800)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:449)
at java.net.URLClassLoader.access$100(URLClassLoader.java:71)
at java.net.URLClassLoader$1.run(URLClassLoader.java:361)
at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
at com.sun.tools.javadoc.DocletInvoker.<init>(DocletInvoker.java:92)
at com.sun.tools.javadoc.Start.setDocletInvoker(Start.java:441)
at com.sun.tools.javadoc.Start.parseAndExecute(Start.java:218)
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
1 error
[ 0% 29/5542] Ensuring Jack server is installed and started
Jack server already installed in "/home/menshen/.jack-server"
Server is already running
是javadoc sdk 版本的问题
解决办法如下:
sudo update-alternatives --config javadoc
选择一个自己合适的版本。