Plugin build fails due to wrong class file version on 2020.3

I get the following error when trying to build my plugin:

class file has wrong version 55.0, should be 52.0

I know this means it is a Java 11 class file attempting to be used with Java 8. My question is why the "should be 52.0" part requiring classes to be Java 8?

I have set the project SDK and language level to Java 11, and the same for the modules, and I don't see anything in build.gradle that indicates any Java version, but it insists that I need to be using Java 8. How do I force it to use Java 11?

What am I missing?

 

2

I finally figured this out on my own.

There was yet another place to specify the Java version in the Gradle JVM field at:

File -> Settings -> Build, Execution, Deployment -> Build Tools -> Gradle

 

3

I tried the solution you mentioned by changing the java version, but I still have the same error

I tried multiple solutions but I can't run the TestRunner class

Also if you know how to can I downgrade the TestNG library from 7.6.0 to 7.5.0 that would help also

thanks

0

I solved the issue by downgrading the testng dependency from pom.xml file to version = 7.0.0 I tried to downgrade it to 7.5.0 but it didn't work, I am not sure why

PS: try to reload changes to activate the sync bofore running your tests

thanks

0

请先登录再写评论。