AndroidStudio使用全新的构建系列—–Gradle。

这是官方为什么使用gradle 的理由:

  • Domain Specific Language (DSL) to describe and manipulate the build logic
  • Build files are Groovy based and allow mixing of declarative elements through the DSL and using code to manipulate the DSL elements to provide custom logic.
  • Built-in dependency management through Maven and/or Ivy.
  • Very flexible. Allows using best practices but doesn’t force its own way of doing things.
  • Plugins can expose their own DSL and their own API for build files to use.
  • Good Tooling API allowing IDE integration

在Ubuntu安装Gradle也是很简单。切记请勿使用apt-get安装Gradle。因为Ubuntu源的Gradle实在太旧。我用的搜狐的源,竟然是2011年。

下面是安装步骤:

1、在官网下载最新的Gradle版本。http://www.gradle.org/downloads

2、解压安装包到目录

 

 

3、

打开环境文件

 

 sudo vim /etc/profile

4、写入环境变量:

 

 

export GRADLE_HOME=/opt/gradle/gradle-2.0 

export PATH=$GRADLE_HOME/bin:$PATH

 

5、环境变量生效source /etc/profile

6、检查结果

gradle -v

相关文章:

  • 2021-06-03
  • 2021-10-14
  • 2022-01-13
  • 2021-12-12
  • 2021-12-12
  • 2022-02-08
  • 2021-06-26
  • 2021-04-20
猜你喜欢
  • 2021-05-27
  • 2021-10-05
  • 2022-12-23
  • 2022-01-12
  • 2022-12-23
  • 2021-09-19
  • 2021-06-28
相关资源
相似解决方案