Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Intellij build after gradle refresh fails on wrong java version

I am using Gradle with intellij.
I refresh Gradle and then I rebuild my project.
I get the following

enter image description here

  • Notice the first line - Using:javac 1.8.0_65

But I get the error that I should use -source7 or higher.
I also set the following at the settings

enter image description here enter image description here

(With all of the inner modules are set to project sdk (1.8)) But I still can't rebuild or compile without this error. Any suggestions?

(obviously i deleted all my classes and jars and then Gradle refreshed and rebuild project)

like image 863
Bick Avatar asked Mar 20 '16 22:03

Bick


1 Answers

Same issue; got it solved with the following:

  1. Go to: File / Settings / Build,Execution,Deployment / Build Tools / Gradle / Gradle JVM
  2. Then choose: Use JAVA_HOME
like image 113
jeankst Avatar answered Oct 21 '22 12:10

jeankst