Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

IntelliJ: Could not target platform: 'Java SE 12' using tool chain: 'JDK 11 (11)'

First of all, I read similar questions and none of them could help me solve it. I use Gradle for building the project. Although I'm using Java 12 (Java 12 is written in the project structure, module settings and run configs) and I tried invalidating the caches and restart. I still keep getting the error I mentioned in the title when I start running my program. Does anyone have any idea on the possible solution?

like image 870
hellokitty Avatar asked Nov 21 '19 12:11

hellokitty


1 Answers

Your can select the correct JDK under:

Intellij IDEA -> Preferences -> Build, Execution, Deployment -> Build Tools -> Gradle -> Gradle JVM

enter image description here

like image 123
Jan S. Avatar answered Sep 20 '22 11:09

Jan S.