Android开发-gradle安装

Android开发-gradle安装,第1张

概述提示一下这里官网是有流程说明的目录提示一下这里官网是有流程说明的1.DownloadthelatestGradledistribution下载官网最新版本[Gradle官网](https://gradle.org/)2.Unpackthedistribution3.Configureyoursystemenvironment4.Verifyyourinstallation1. 提示一下这里官网是有流程说明的

目录提示一下这里官网是有流程说明的1.Download the latest Gradle distribution下载官网最新版本[Gradle官网](https://gradle.org/)2.Unpack the distribution3.Configure your system environment4. Verify your installation

1.Download the latest Gradle distribution下载官网最新版本Gradle官网

The current Gradle release is version 6.8.3, released on 22 Feb 2021. The distribution zip file comes in two flavors:

Binary-onlyComplete, with docs and sources(这里我选这个)

2.Unpack the distribution

linux&MacOS users
unzip the distribution zip file in the directory of your choosing,e.g:

$ mkdir /opt/gradle$ unzip -d /opt/gradle gradle-6.8.3-bin.zip$ ls /opt/gradle/gradle-6.8.3liCENSE  NOTICE  bin  getting-started.HTML  init.d  lib  media

Microsoft windows users
Create a new directory D:\gradle with file Explorer.
Open a second file Explorer window and go to the directory where the Gradle distribution was downloaded. Double-click the ZIP archive to expose the content. Drag the content folder gradle-6.8.3 to your newly created D:\Gradle folder.
Alternatively you can unpack the Gradle distribution ZIP into C:\Gradle using an archiver tool of your choice(我是按照这里执行解压缩).

3.Configure your system environment

linux & MacOS users
Configure your PATH environment variable to include the bin directory of the unzipped distribution, e.g.:

 $ export PATH=$PATH:/opt/gradle/gradle-6.8.3/bin

Microsoft windows users
In file Explorer right-click on the This PC (or Computer) icon, then click PropertIEs -> Advanced System Settings -> Environmental Variables.

Under System Variables select Path, then click Edit. Add an entry for C:\Gradle\gradle-6.8.3\bin. Click OK to save(这里是添加路径path指定到bin).

4. Verify your installation

Open a console (or a windows command prompt) and run gradle -v to run gradle and display the version, e.g.:

$ gradle -v------------------------------------------------------------Gradle 6.8.3------------------------------------------------------------

› Additional helpful information
Upgrade with the Gradle Wrapper
If your existing Gradle-based build uses the Gradle Wrapper, you can easily upgrade by running the wrapper task, specifying the desired Gradle version:

$ ./gradlew wrapper --gradle-version=6.8.3 --distribution-type=bin

Note that it is not necessary for Gradle to be installed to use the Gradle wrapper. The next invocation of gradlew or gradlew.bat will download and cache the specifIEd version of Gradle.

$ ./gradlew tasksDownloading https://services.gradle.org/distributions/gradle-6.8.3-bin.zip...
总结

以上是内存溢出为你收集整理的Android开发-gradle安装全部内容,希望文章能够帮你解决Android开发-gradle安装所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

欢迎分享,转载请注明来源:内存溢出

原文地址: http://outofmemory.cn/web/1035883.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-05-24
下一篇 2022-05-24

发表评论

登录后才能评论

评论列表(0条)

保存