ICode9

精准搜索请尝试: 精确搜索
首页 > 其他分享> 文章详细

Android开发-gradle安装

2021-03-10 13:01:22  阅读:309  来源: 互联网

标签:bin distribution Gradle Android gradle 安装 your 6.8


提示一下这里官网是有流程说明的

目录

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:

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.3
LICENSE  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 tasks
Downloading https://services.gradle.org/distributions/gradle-6.8.3-bin.zip
...

标签:bin,distribution,Gradle,Android,gradle,安装,your,6.8
来源: https://blog.csdn.net/weixin_45576146/article/details/114624876

本站声明: 1. iCode9 技术分享网(下文简称本站)提供的所有内容,仅供技术学习、探讨和分享;
2. 关于本站的所有留言、评论、转载及引用,纯属内容发起人的个人观点,与本站观点和立场无关;
3. 关于本站的所有言论和文字,纯属内容发起人的个人观点,与本站观点和立场无关;
4. 本站文章均是网友提供,不完全保证技术分享内容的完整性、准确性、时效性、风险性和版权归属;如您发现该文章侵犯了您的权益,可联系我们第一时间进行删除;
5. 本站为非盈利性的个人网站,所有内容不会用来进行牟利,也不会利用任何形式的广告来间接获益,纯粹是为了广大技术爱好者提供技术内容和技术思想的分享性交流网站。

专注分享技术,共同学习,共同进步。侵权联系[81616952@qq.com]

Copyright (C)ICode9.com, All Rights Reserved.

ICode9版权所有