在Mac上找不到Gradle home [英] Gradle home cannot be found on Mac

查看:195
本文介绍了在Mac上找不到Gradle home的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在MAC上使用终端安装了 gradle

I've installed gradle on MAC using terminal.

brew install gradle

Gradle已成功安装。

Gradle has been installed successfully.

gradle -v

------------------------------------------------------------
Gradle 3.3
------------------------------------------------------------

Build time:   2017-01-03 15:31:04 UTC
Revision:     075893a3d0798c0c1f322899b41ceca82e4e134b

Groovy:       2.4.7
Ant:          Apache Ant(TM) version 1.9.6 compiled on June 29 2015
JVM:          1.8.0_112 (Oracle Corporation 25.112-b16)
OS:           Mac OS X 10.12.3 x86_64

但我找不到gradle home。

but I can not find gradle home.

echo $GRADLE_HOME
[empty result]

确定主目录的第一步是检测<$ c $的位置c> gradle 指令:

the first step to determine home directory is detect location of gradle instruction:

which gradle
/usr/local/bin/gradle

有难以理解的bash文件。

there is incomprehensible bash file.

如何通过终端检测gradle主目录的任何想法?

Any ideas how to detect gradle home directory via terminal?

推荐答案

你可以使用命令:

brew info gradle

结果你会得到这样的结果:

As the result you will have something like this:

gradle: stable 4.0.1
Build system based on the Groovy language
https://www.gradle.org/
/usr/local/Cellar/gradle/3.4 (181 files, 74.5MB) *
  Built from source on 2017-02-24 at 15:01:34
From: https://github.com/Homebrew/homebrew-core/blob/master/Formula/gradle.rb
==> Requirements
Required: java >= 1.7 ✔
==> Options
--with-all
    Installs Javadoc, examples, and source in addition to the binaries

在这里,在第4行你可以看到主路径: /usr/local/Cellar/gradle/3.4

Here, on the line 4 you can see the home path : /usr/local/Cellar/gradle/3.4

这篇关于在Mac上找不到Gradle home的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆