Every once in a while, I start getting `e: java.la...
# compose-desktop
k
Every once in a while, I start getting
e: java.lang.UnsupportedClassVersionError: androidx/compose/compiler/plugins/kotlin/ComposeComponentRegistrar 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 53.0
in both IntelliJ and terminal build with compose desktop. My Java stays on
11.0.16+11-LTS-199
in both places. Once that starts, pretty much the only way out is to reboot my machine. Is there anything I can run to help diagnose this once it starts happening? Otherwise I’m not sure how useful it would be to file it as a bug.
i
55 corresponds to Java 11 53 corresponds to Java 9 (see https://en.wikipedia.org/wiki/Java_class_file#General_layout) Not sure, but maybe your issue is somehow related to Gradle Daemon. Next time when you experience the issue, try to run:
Copy code
./gradlew --stop
in the terminal, and see if the issue disappears
k
Thanks, will do
Just happened again.
./gradlew --stop
fixed it!
i
It means that the same java is used for compiling code that uses Compiler plugins, on which the first Gradle was ran. Not sure if it is a bug of Gradle, or Kotlin Gradle Plugin 🤔