JDK 11 SDK Manager LinkageError SdkManagerCli
-
I need to build Qt 5.13 code for Android.
I failed with JDK 17. Then I try to setup JDK 11.
But I got setup error on Android SDK Manager.
Error message isError:LinkageError occurred while loading main class com.android.sdklib.tool.sdkmanager.SdkManagerCli
java.lang.UnsupportedClassVersionError: com/android/sdklib/tool/sdkmanager/SdkManagerCli has been compiled by a more recent version of Java Runtime (class file version 61.0), this version of the Java Runtime only recognizes class file version up to 55.0 -
@Stamat What I did is: uninstalled all JREs, by Uninstall in Apps & Features in Win 10 or the JRE Removing tool from Oracle java, and also Uninstalled all other javas (openjdk), ensured that no paths set in PATH env var (Environment variables button on Win 10), then in cmd typed: java --version, to see no javas.
Then:
Cleanly installed openjdk 17 with all installation options set (path, java_home, etc, and saw PATH env var (Environment variables button on Win 10)) then in cmd typed: java --version, to see that jdk and jre are openjdk 17.
Then:
Cleanly installed openjdk 11 with all installation options UNset (path, java_home, etc, and saw PATH env var (Environment variables button on Win 10), that openjdk 11 is not set in path), then in cmd typed: java --version to see that jdk and jre are still openjdk 17. This way the intention is to have JRE 17, and optionally in the IDEs to choose the JDKs path (assume the IDEs use this path as JAVA_HOME).