merdekacyber
merdekacyber

Reputation: 51

How to fix "Gradle 5.4 requires Java 8 or later to run. Your build is currently configured to use Java 7"

enter image description here

I use IntelliJ IDEA, and there is a problem message:

"Gradle 5.4 requires Java 8 or later to run. Your build is currently configured to use Java 7"

How to handle it?

Upvotes: 5

Views: 17627

Answers (3)

Ruchira Nawarathna
Ruchira Nawarathna

Reputation: 1507

Check JAVA_HOME. It might be set to Java 7.

echo $JAVA_HOME

Upvotes: 4

Aziz
Aziz

Reputation: 5

Resolved by:

  1. Press Ctrl-Alt-Shift-S to open Project Structure
  2. Change JDK location to embedded JDK (See screenshot attached)

Apply this and run your app it will resolve this issue

click to open screenshot

Upvotes: -2

CrazyCoder
CrazyCoder

Reputation: 402225

Change the Gradle JVM or the Project JDK. You can also use an older Gradle version if you want to stay on Java 7.

Upvotes: 5

Related Questions