[英]Throw an exception when open a gradle application by Idea
I'm a newer to gradle
,and when i open a gradle
application with idea
,Then it throw an error Gradle 3.1 requires Java 7 or later to run. Your build is currently configured to use Java 6
我是gradle
,当我打开一个gradle
应用程序的idea
,然后抛出一个错误Gradle 3.1 requires Java 7 or later to run. Your build is currently configured to use Java 6
Gradle 3.1 requires Java 7 or later to run. Your build is currently configured to use Java 6
. Gradle 3.1 requires Java 7 or later to run. Your build is currently configured to use Java 6
。
My gradle
info: 我的gradle
信息:
Build time: 2016-09-19 10:53:53 UTC 建立时间:2016-09-19 10:53:53 UTC
Revision: 13f38ba699afd86d7cdc4ed8fd7dd3960c0b1f97 修订:13f38ba699afd86d7cdc4ed8fd7dd3960c0b1f97
Groovy: 2.4.7 Groovy:2.4.7
Ant: Apache Ant(TM) version 1.9.6 compiled on June 29 2015 蚂蚁:2015年6月29日编译的Apache Ant(TM)版本1.9.6
JVM: 1.8.0_60 (Oracle Corporation 25.60-b23) JVM:1.8.0_60(Oracle Corporation 25.60-b23)
OS: Mac OS X 10.11.6 x86_64 作业系统:Mac OS X 10.11.6 x86_64
error 错误
idea setting 想法设定
file -> other settings -> default project setting 文件->其他设置->默认项目设置
EIDT 信息技术部
Log 日志记录
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.
将想法版本更新为2016.2.5
,问题已解决。
Check your local.properties file to see which version of java gradle is trying to reference. 检查您的local.properties文件,以查看尝试引用哪个Java gradle版本。 This file should be in the same directory as your gradle file. 该文件应与gradle文件位于同一目录中。
Typically this file is automatically configured on project creation, but it depends on your intellij settings. 通常,此文件在项目创建时自动配置,但是取决于您的intellij设置。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.