Ubuntu14.04 安装Gradle

简介: 转载:http://blog.csdn.net/coloriy/article/details/60878527系统是Ubuntu14.

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

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

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

[java]  view plain  copy
 
  在CODE上查看代码片 派生到我的代码片
  1. sudo add-apt-repository ppa:cwchien/gradle  

2、更新源,执行命令:

[java]  view plain  copy
 
  在CODE上查看代码片 派生到我的代码片
  1. sudo apt-get update  

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

[java]  view plain  copy
 
  在CODE上查看代码片 派生到我的代码片
  1. apt-cache search gradle  

我的系统查看结果如下:

[java]  view plain  copy
 
  在CODE上查看代码片 派生到我的代码片
  1. gradle-doc - Documentation for gradle  
  2. libgradle-core-java - Groovy based build system - Core library  
  3. libgradle-plugins-java - Groovy based build system - All plugins  
  4. missidentify - a program to find win32 applications  
  5. gradle - Gradle is a Groovy based build system  
  6. gradle-ppa - Gradle is a Groovy based build system  
  7. gradle-2.10 - Gradle is a Groovy based build system  
  8. gradle-2.11 - Gradle is a Groovy based build system  
  9. gradle-2.12 - Gradle is a Groovy based build system  
  10. gradle-2.13 - Gradle is a Groovy based build system  
  11. gradle-2.14 - Gradle is a Groovy based build system  
  12. gradle-2.14.1 - Gradle is a Groovy based build system  
  13. gradle-3.0 - Gradle is a Groovy based build system  
  14. gradle-3.1 - Gradle is a Groovy based build system  

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

[java]  view plain  copy
 
  在CODE上查看代码片 派生到我的代码片
  1. sudo apt-get install gradle-3.1  

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

[java]  view plain  copy
 
  在CODE上查看代码片 派生到我的代码片
  1. FAILURE: Build failed with an exception.  
  2.   
  3. * What went wrong:  
  4. Gradle 3.1 requires Java 7 or later to run. You are currently using Java 6.  

相关文章
|
21天前
|
Ubuntu NoSQL 关系型数据库
Ubuntu系统下安装常用软件
Ubuntu系统下安装常用软件
42 0
Ubuntu系统下安装常用软件
|
1月前
|
Ubuntu Linux C语言
Ubuntu下安装vscode,并解决终端打不开vscode的问题
Ubuntu下安装vscode,并解决终端打不开vscode的问题
134 0
|
2月前
|
存储 Ubuntu 网络协议
|
1月前
|
Ubuntu Docker 容器
如何在Ubuntu上安装Docker?
【2月更文挑战第10天】
239 0
|
2月前
|
负载均衡 Ubuntu 应用服务中间件
|
23天前
|
Ubuntu 关系型数据库 MySQL
Ubuntu 中apt 安装MySQL数据库
Ubuntu 中apt 安装MySQL数据库
66 0
|
2天前
|
Ubuntu 数据安全/隐私保护
在UBUNTU虚拟机上安装R软件包
在UBUNTU虚拟机上安装R软件包
|
2天前
|
存储 编解码 Ubuntu
0-零基础安装ubuntu(超详细安装步骤)
0-零基础安装ubuntu(超详细安装步骤)
|
3天前
|
Ubuntu Linux 定位技术
手把手教你优雅的安装虚拟机 Ubuntu —— 图文并茂
手把手教你优雅的安装虚拟机 Ubuntu —— 图文并茂
|
17天前
|
Ubuntu Linux 虚拟化
【Linux】ubuntu安装samba服务器
【Linux】ubuntu安装samba服务器