我的应用中不支持的主要.次要版本 52.0
2022-08-31 08:37:41
我正在尝试编译我的Android项目,但我收到此错误
[INFO] Exception in thread "main" java.lang.UnsupportedClassVersionError: com/android/dx/command/Main : Unsupported major.minor version 52.0
[INFO] at java.lang.ClassLoader.defineClass1(Native Method)
[INFO] at java.lang.ClassLoader.defineClass(ClassLoader.java:800)
[INFO] at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
[INFO] at java.net.URLClassLoader.defineClass(URLClassLoader.java:449)
[INFO] at java.net.URLClassLoader.access$100(URLClassLoader.java:71)
[INFO] at java.net.URLClassLoader$1.run(URLClassLoader.java:361)
[INFO] at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
[INFO] at java.security.AccessController.doPrivileged(Native Method)
[INFO] at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
[INFO] at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
[INFO] at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
[INFO] at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
[INFO] at sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:482)
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
我一直在阅读其他帖子,尝试使用Java 8编译可能会导致该错误,但不是我的情况,我有以下Java版本:
java version "1.7.0_79"
OpenJDK Runtime Environment (IcedTea 2.5.5) (7u79-2.5.5-0ubuntu0.14.04.2)
OpenJDK 64-Bit Server VM (build 24.79-b02, mixed mode)
操作系统:Linux Mint(我没有安装Java 8。构建: MAVEN
任何人都可以帮我吗?