Cant build libgdx project - intellij-idea

I got the error that states "Unsupported class file major version 57" while trying to build LibGdx project, along with few other notifications. Same happens when trying to build using IntelliJ idea.
I have no idea how to fix that.

"Unsupported class file major version 57" means your version of Java is incompatible with the one with which Gradle was compiled. You have to make sure that the Java version you are using is compatible to the Gradle version you are using. I guess you have either to downgrade your Java version or upgrade the Gradle version.

Related

How to use javaparser plugin of JQAssistant?

I'm trying to use javaparser plugin of JQAssistant using command line. I have done the following:
Copied "jqassistant.plugin.javaparser-1.8.0.jar" to "plugin" folder.
I also noticed plugin has runtime dependency to "com.github.javaparser:javaparser-core:3.6.25". So I copied "javaparser-core-3.6.25.jar" to plugin folder too.
But when I try to scan a Java file I get the following error:
"ANTLR Tool version 4.9.2 used for code generation does not match the current runtime version 4.7.2"
The ANTLR version bundled with JQAssistant is 4.9.2 but plugin is expecting older version 4.7.2.
Has anyone been able to use javaparser plugin?
Some plugins (not only javaparser) indeed depend on JARs bundled with jQAssistant. Sometimes there are version conflicts, that's why it can only be guaranteed that Kontext E plugins with a certain version (let's say 1.8.x) are compatible with jQAssistant with the same major and minor version (so jQA 1.8 in this case). If you use javaparser 1.8.0 with jQAssistant 1.8.0 (which comes with org.antlr-antlr4-runtime-4.7.2), it works.

Class 'my.example.Class' is compiled by a pre-release version of Kotlin and cannot be loaded by this version of the compiler

I am using IntelliJ, I published a library but when I try to use it, I get the warning: Class 'my.packge.MyClass' is compiled by a pre-release version of Kotlin and cannot be loaded by this version of the compiler.
I am using the same build.gradle.kts on both projects, same kotlin version (1.6.21).
The weirdest part is that if I do build, the projects build just fine without any error.
Any suggestions on what could be going on?
Seem to be Kotlin's bug:
https://youtrack.jetbrains.com/issue/KTIJ-21563
Watch it in order to be notified once it has updates. See this article if you are not familiar with YouTrack.

Intellij-idea Debugger - Coroutine tab : "An error occurred on fetching information"

I'm trying to do some coroutine example represented on : https://github.com/Kotlin/kotlinx.coroutines/blob/master/kotlinx-coroutines-core/jvm/test/guide/example-basic-02.kt
and It's debugger not working properly.
As you see, even code about coroutine like 'runBlocking' or 'launch' is not detected by intellisense,
I don't know what is my problem.
First my project is kotlin Console program, and
What I've done to import kotlinx.coroutine to my project are :
at Project Structure, Module downloaded org.jetbrains.kotlinx:kotlinx-coroutines-core:1.5.0-RC from Maven, when downloading checked Trasitive-something and Source, and added at library.
at Settings -> Build -> Kotlin compiler, changed language version and API version to 1.5, which is experimental version of Kotlin
at Project tool and build.gradle.kts, added
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.5.0-RC") at dependencies,
kotlin("jvm") version "1.5.0" at plugins
Just run projects works well, but I can't use any context menu when using code about coroutine and as you know, it's really annoying me. any help would be appreciated.
I had the same problem but it seems to be fixed in 1.5.0. See https://youtrack.jetbrains.com/issue/KTIJ-11620
I meet this problem today, I use the latest the Coroutine library version and my kotlin version is 1.6.21 which is not the latest.
I just update my kotlin version to the latest version 1.8.10.

Custom Intellij plugin not working in older version from the version its created on

I have created a Intellij idea plugin with java and gradle by using intelli idea 2020.2.2 and its working fine in intellij 2020.2.2 and its higher version but while i am trying to use it in older versions like 2020.1.X or other older version its not working show "Incompatible with this installation" issue.
I want to use this custom plugin also with older verion.enter image description here

The binary version of its metadata is 1.0.1, expected version is 1.1.0

In intellij idea 16 EAP 144.3357.4 I have a pure Kotlin cmd project currently refusing to run with this error:
The binary version of its metadata is 1.0.1, expected version is 1.1.0
The project runs on the command-line - I invalidated caches and restarted Idea - nothing helped. Anyone had the same problem and found a way to get it working?
The problem seems to be mismatch between the kotlin library used in your project and the version of the plugin are not compatible.
Check the Kotlin plugin version and you'll most likely see something similar to:
Version: 1.0.0-rc-1007-IJ143-11
Then check the version of the Kotlin libraries by looking into META-INF/build.txt or META-INF/MANIFEST.MF and it'll most likely be other version like 1.0.0-beta-4589.
To resolve the problem update Kotlin libraries to version 1.0.0-rc-1007 which can be found in this maven repository: https://dl.bintray.com/kotlin/kotlin-eap.
Kotlin compiler marks each .class with #kotlin.Metadata to indicate, among others:
The version of the bytecode interface (naming conventions, signatures) of the class file annotated with this annotation.
That is how the compiler detected incompatibilities.