Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exception in thread "main" java.lang.UnsupportedClassVersionError: com/android/ddmlib/Log$ILogOutput has been compiled by a more recent version of the Java Runtime (class file version 55.0) #377

Open
Bingoliallen opened this issue Sep 13, 2024 · 2 comments

Comments

@Bingoliallen
Copy link

Bingoliallen commented Sep 13, 2024

Bundletool Version: 1.17.1

cmd:
java -jar -Xms512m -Xmx512m bundletool-all-1.17.1.jar build-apks --mode=universal --bundle=0.2.60.aab --output=aab.apks --ks=app.keystore" --ks-pass=pass:xxx --ks-key-alias=xxx --key-pass=pass:xxx

Error :
Exception in thread "main" java.lang.UnsupportedClassVersionError: com/android/ddmlib/Log$ILogOutput has been compiled by a more recent version of the Java Runtime (class file version 55.0), this version of the Java Runtime only recognizes class file versions up to 52.0
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:763)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:468)
at java.net.URLClassLoader.access$100(URLClassLoader.java:74)
at java.net.URLClassLoader$1.run(URLClassLoader.java:369)
at java.net.URLClassLoader$1.run(URLClassLoader.java:363)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:362)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:349)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
at com.android.tools.build.bundletool.BundleToolMain.main(BundleToolMain.java:82)
at com.android.tools.build.bundletool.BundleToolMain.main(BundleToolMain.java:55)

My current java version:
java version "1.8.0_77"
Java(TM) SE Runtime Environment (build 1.8.0_77-b03)
Java HotSpot(TM) 64-Bit Server VM (build 25.77-b03, mixed mode)

@inimist
Copy link

inimist commented Nov 25, 2024

Anyone?

@JLucasGaldino
Copy link

Hello. I ran into the same problem. You must update your java runtime. How to do that will depend on what OS you're using. You should end up with:

openjdk version "23" 2024-09-17
OpenJDK Runtime Environment (build 23)
OpenJDK 64-Bit Server VM (build 23, mixed mode, sharing)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants