Ubuntu14.04 安装Gradle

前端之家收集整理的这篇文章主要介绍了Ubuntu14.04 安装Gradle前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。

转载:http://blog.csdn.net/coloriy/article/details/60878527

系统是Ubuntu14.04,安装步骤如下:

1、添加PPA仓库,执行命令:

[java] view plain copy
  1. sudoadd-apt-repositoryppa:cwchien/gradle

2、更新源,执行命令:

sudoapt-getupdate


3、查看可以安装的Gradle版本,执行命令:

apt-cachesearchgradle

我的系统查看结果如下:

gradle-doc-Documentationforgradle

  • libgradle-core-java-Groovybasedbuildsystem-Corelibrary
  • libgradle-plugins-java-Groovybasedbuildsystem-Allplugins
  • missidentify-aprogramtofindwin32applications
  • gradle-GradleisaGroovybasedbuildsystem
  • gradle-ppa-GradleisaGroovybasedbuildsystem
  • gradle-2.10-GradleisaGroovybasedbuildsystem
  • gradle-2.11-GradleisaGroovybasedbuildsystem
  • 2.12-GradleisaGroovybasedbuildsystem
  • 2.13-GradleisaGroovybasedbuildsystem
  • 2.14-GradleisaGroovybasedbuildsystem
  • 2.14.1-GradleisaGroovybasedbuildsystem
  • 3.0-GradleisaGroovybasedbuildsystem
  • 3.1-GradleisaGroovybasedbuildsystem
  • 4、安装目标版本,我选择安装gradle-3.1,执行命令:

    sudoapt-getinstallgradle-3.1

    5、需要注意的是,运行gradle3.1需要JDK7及其之上的版本,否则运行会给出如下提示

    FAILURE:BuildFailedwithanexception.

  • *Whatwentwrong:
  • Gradle3.1requiresJava7orlatertorun.YouarecurrentlyusingJava6.
  • 猜你在找的Ubuntu相关文章