Can't import java.lang.module.ModuleDescriptor.Version

Viewed 23
3 Answers

You are not changing the Java version for your project - you are changing the Java version that Gradle should use (as indicated by the "Gradle JVM" label before the dropdown selector).

If you want your project to use Java 18 you must change it under "File" -> "Project Structure" (which opens the Project Settings) and there under the tab "Project", entry "SDK".

Related