Skip to content Skip to sidebar Skip to footer

Java.lang.UnsupportedClassVersionError: Com/google/doclava/Doclava : Unsupported Major.minor Version 51.0 Android Build

I am trying to build by own AOSP from google source. I follwed the steps mentioned in the Google Documents and was successfully able to build it and flash my device with the images

Solution 1:

In this case it's not the problem with javac, but with javadoc. To check its version: javadoc -J-version (yes, it's weird).

So, you have to use:

update-alternatives --config javadoc

Solution 2:

This error means you're trying to load a Java "class" file that was compiled with a newer version of Java than you have installed.

For example, your .class file could have been compiled for JDK 7, and you're trying to run it with JDK 6.

So the solution is to either:

  • Upgrade your Java runtime or
  • Recompile the class if you have the source, using your local Java compiler (if you have one).

    javac FileName.java

visit this more detail: How to fix java.lang.UnsupportedClassVersionError: Unsupported major.minor version


Post a Comment for "Java.lang.UnsupportedClassVersionError: Com/google/doclava/Doclava : Unsupported Major.minor Version 51.0 Android Build"