Issue
After trying to build my project in Mac OS X El Capitan I've got this error:
Error:Gradle: A problem occurred configuring project ':app'. Buildtools 24.0.2 requires Java 1.8 or above. Current JDK version is 1.7.
I have project with build.gradle
section like this:
android {
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
Also:
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
retrolambda
P.S.: I successfully built this project from command line.
Solution
After checking IDEA global settings I've found solution:
https://www.dropbox.com/s/26mz2d2mbir1r2j/Screen%20Shot%202016-09-01%20at%209.56.37%20PM.png?dl=0
Preferences -> Build, Execution, Deployment -> Gradle -> Gradle JVM -> Set to 1.8 and this works!
Answered By - Alexander Efremenkov
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.