Ubuntu14.04 安装Gradle

    xiaoxiao2021-03-25  131

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

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

    [java]  view plain  copy   sudo add-apt-repository ppa:cwchien/gradle   2、更新源,执行命令:

    [java]  view plain  copy   sudo apt-get update   3、查看可以安装的Gradle版本,执行命令:

    [java]  view plain  copy   apt-cache search gradle  

    我的系统查看结果如下:

    [java]  view plain  copy   gradle-doc - Documentation for gradle   libgradle-core-java - Groovy based build system - Core library   libgradle-plugins-java - Groovy based build system - All plugins   missidentify - a program to find win32 applications   gradle - Gradle is a Groovy based build system   gradle-ppa - Gradle is a Groovy based build system   gradle-2.10 - Gradle is a Groovy based build system   gradle-2.11 - Gradle is a Groovy based build system   gradle-2.12 - Gradle is a Groovy based build system   gradle-2.13 - Gradle is a Groovy based build system   gradle-2.14 - Gradle is a Groovy based build system   gradle-2.14.1 - Gradle is a Groovy based build system   gradle-3.0 - Gradle is a Groovy based build system   gradle-3.1 - Gradle is a Groovy based build system  

    4、安装目标版本,我选择安装gradle-3.1,执行命令:

    [java]  view plain  copy   sudo apt-get install gradle-3.1  

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

    [java]  view plain  copy   FAILURE: Build failed with an exception.      * What went wrong:   Gradle 3.1 requires Java 7 or later to run. You are currently using Java 6.  
    转载请注明原文地址: https://ju.6miu.com/read-5239.html

    最新回复(0)