Throw an exception when opening the gradle application in theory

I am new to gradle, and when I open the application gradlewith idea, then it gives an error Gradle 3.1 requires Java 7 or later to run. Your build is currently configured to use Java 6.

My gradleinfo:


Gradle 3.1

Build time: 2016-09-19 10:53:53 UTC

Version: 13f38ba699afd86d7cdc4ed8fd7dd3960c0b1f97

Groovy: 2.4.7

Ant: Apache Ant (TM) version 1.9.6, compiled June 29, 2015

JVM: 1.8.0_60 (Oracle Corporation 25.60-b23)

OS: Mac OS X 10.11.6 x86_64


Idea

enter image description here

Error

enter image description here

idea

file → other settings → project default setting

enter image description here

Eidt

Magazine

2016-10-30 14:25:06,941 [1651420]   INFO - .BaseProjectImportErrorHandler - Failed to import Gradle project at '/Users/famoss/Downloads/btrace-master/gradle' 

org.gradle.tooling.GradleConnectionException: Could not create an instance of Tooling API implementation using the specified Gradle installation '/Users/famoss/Downloads/gradle-3.1'.

Caused by: org.gradle.internal.jvm.UnsupportedJavaRuntimeException: Gradle 3.1 requires Java 7 or later to run. You are currently using Java 6.
+4
source share
2 answers

Update the version of the idea to 2016.2.5and the problem will be solved.

+3
source

local.properties, , java gradle . , gradle.

, .

0

Source: https://habr.com/ru/post/1659311/


All Articles