Error:Gradle: A problem emerged configuring task ":app".Buildtools 24.0.2 needs Java 1.8 or above. Existing JDK version is 1.7.

You are watching: Error:buildtools 24.0.2 requires java 1.8 or above. current jdk version is 1.7.

I have actually project v build.gradle section like this:

android { compileOptions sourceCompatibility JavaVersion.VERSION_1_8 targetCompatibility JavaVersion.VERSION_1_8Also:

Project SDK 1.8.0_101

App Module: android sdk 24, jdk 1.8,

Root Module: android sdk 24, jdk 1.8

compileSdkVersion 24

buildToolsVersion "24.0.2"

minSdkVersion 16

targetSdkVersion 24


P.S.: i successfully developed this job from command line.

java android macos intellij-idea android-sdk-tools
edited Jun 20 "20 in ~ 9:12

111 silver- badge
asked Sep 1 "16 in ~ 17:26

Alexander EfremenkovAlexander Efremenkov
15111 gold badge22 silver badges99 bronze title
include a comment |

3 answer 3

active earliest Votes
Since girlfriend successfully constructed it in the command line, that seems prefer it"s a problem with your task JDK. The JDK location setting is located in File>Project Structure>SDK ar --> JDK Location. If it claims anything about jdk1.7.0, then switch the jdk to 1.8 by click the ... Button to the right of the prompt and also give the the document path of jdk1.8.

EDIT: If friend don"t understand the route of the jdk, run ls -l "which java" in the terminal.

reply Sep 1 "16 at 17:36

Carter BrainerdCarter Brainerd
18122 silver- badges99 bronze title
include a comment |
After checking IDEA global settings I"ve discovered solution:

Preferences -> Build, Execution, Deployment -> Gradle -> Gradle JVM -> set to 1.8 and this works!

answer Sep 1 "16 in ~ 18:59

Alexander EfremenkovAlexander Efremenkov
15111 yellow badge22 silver badges99 bronze title
include a comment |
Make sure you have actually correct versions defined under:File -> job Structure -> project -> task SDK -> job Language Level (this is because that mac, however I think you can find it because that windows using the exact same logic).

reply Sep 1 "16 at 17:42

Deniss M.Deniss M.
2,8991010 gold badges4242 silver- badges8181 bronze title
| show 3 more comments

her Answer

Thanks for contributing an answer to stack Overflow!

Please be certain to answer the question. Administer details and share her research!

But avoid

Asking because that help, clarification, or responding to various other answers.Making statements based on opinion; ago them increase with referrals or an individual experience.

To find out more, check out our tips on writing great answers.

See more: How To Make Eraser Bigger In Paint Tool Ms Paint Windows 10, How To Make Eraser Bigger In Paint

Draft saved
Draft discarded

Sign increase or log in in

sign up utilizing Google
authorize up using Facebook
authorize up utilizing Email and Password

Post together a guest

email Required, yet never shown

Post as a guest


Required, but never shown

post Your answer Discard

By click “Post her Answer”, you agree to our terms of service, privacy policy and also cookie plan

Not the prize you're looking for? Browse other questions tagged java android macos intellij-idea android-sdk-tools or ask your very own question.

The Overflow Blog
Featured ~ above Meta
How to specify the JDK version in Android Studio?
IDEA: javac: resource release 1.7 requires target release 1.7
how do I change the IntelliJ IDEA default JDK?
exactly how to collection or change the default Java (JDK) version on macOS?
Failed come sync the gradle because that firebase in android
setting JavaVersion sourceCompatibility in Leiningen (Clojure) because that Android (Java 1.7 vs 1.8)
might not uncover
hot Network inquiries more hot questions

inquiry feed
i ordered it to RSS
question feed To i ordered it to this RSS feed, copy and paste this URL into your RSS reader.

stack Overflow
stack Exchange Network
site style / logo design © 2021 ridge Exchange Inc; user contributions license is granted under cc by-sa. Rev2021.9.16.40232

Stack Overflow works best with JavaScript enabled

your privacy

By clicking “Accept all cookies”, girlfriend agree stack Exchange deserve to store cookie on your device and disclose information in accordance v our Cookie Policy.