'compiled by a more recent version of Java Runtime(class file version 55.0),this version of Java Runtime only recognizes class file versions up to 52.0

I'm stuck with this problem for few days now. I have a Spring Boot application which I've created locally and I want to deploy it to Google Cloud App Engine. I'm using a Cloud Code plugin so that I can deploy from within Intellij. I've been trying to deploy from gcloud CLI but I kept getting errors, so now I'm trying to do the same from within Intellij. This is the error that I'm getting: enter image description here

I've set everything to java 11 in the project structure, and in the java compiler settings too, my local java version is also 11, what might be the problem?



Solution 1:[1]

I've set everything to java 11 in the project structure, and in the java compiler settings too, my local java version is also 11, what might be the problem?

Google is the problem. Specifically, evidently AppEngine itself, or possibly because you configured it that way, is limited to java8 which is end of lifed at this point (but still widely used). v52 is java8, v55 is java11.

Set your stuff to java8, recompile, try again.

Solution 2:[2]

Set runtime: java11 in your app.yaml file.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 rzwitserloot
Solution 2 tgdavies