6.Macbook:gradle 无需配置,查看版本

场景

在用MacBook进行android开发时,会经常使用gradle命令打包等操作,gradle -version
会遇到这样的提示:

bash: gradle: command not found

解决方案

Mac自带了gradle,我们只需要这样即可:

./gradlew -version

运行结果:

------------------------------------------------------------
Gradle 4.7
------------------------------------------------------------

Build time:   2018-04-18 09:09:12 UTC
Revision:     b9a962bf70638332300e7f810689cb2febbd4a6c

Groovy:       2.4.12
Ant:          Apache Ant(TM) version 1.9.9 compiled on February 2 2017
JVM:          1.8.0_181 (Oracle Corporation 25.181-b13)
OS:           Mac OS X 10.14 x86_64

你可能感兴趣的:(6.Macbook:gradle 无需配置,查看版本)