AndroidStudio Gradle手动下载和安装

操作流程概述:

下载好的压缩包和解压后的文件夹复制到gradle-5.5.1-all --->97z1ksx6lirer3kbvdnh7jtjg文件夹下,将gradle-5.5.1-all.zip.part文件删除,复制一份gradle-5.5.1-all.zip.lck文件,重命名为gradle-5.5.1-all.zip.ok,重启Android Studio。

详细步骤:

确定所需版本

在Project的视图下,找到gradle,里面的cradle-wrapper.properties 里面的gradle版本即为我们所需

下载地址:https://services.gradle.org/distributions/

提示:可以修改gradle目录位置,因为默认位置在C盘

打开AndroidStudio自动生成文件夹 /.gradle/wrapper/dists/gradle-5.5.1-all/97z1ksx6lirer3kbvdnh7jtjg

当Android Studio下载过gradle-5.5.1-all之后(不管成功失败),就会在C:/Users/用户名/.gradle/wrapper/dists(或自己修改的.gradle缓存目录/wrapper/dists)中出现gradle-5.5.1-all文件夹,打开之后是一串以无规律字符命名的文件夹,我的是97z1ksx6lirer3kbvdnh7jtjg,这个可能因人而异。打开之后就是真正的gradle文件。

因为已经修改了gradle的默认路径,所以我需要打开E:\software\JetBrains\Toolbox\apps\AndroidStudio\Android\.gradle\wrapper\dists\gradle-5.1.1-all\97z1ksx6lirer3kbvdnh7jtjg目录

复制文件

将下载好的压缩包和解压后的文件夹复制到上述文件夹下;
将gradle-5.5.1-all.zip.part文件删除;
复制一份gradle-5.5.1-all.zip.lck文件,重命名为gradle-5.5.1-all.zip.ok;

重启Android Studio。

 

参考:https://www.jianshu.com/p/7d0192c9dbfe

About This Book, Create custom Gradle tasks and plugins for your Android projects, Configure different build variants, each with their own dependencies and properties, Manage multi-module projects, and integrate modules interdependently, Who This Book Is For, If you are an experienced Android developer wanting to enhance your skills with the Gradle Android build system, then this book is for you. As a prerequisite, you will need some knowledge of the concepts of Android application development., What You Will Learn, Build new Android apps and libraries using Android Studio and Gradle, Migrate projects from Eclipse to Android Studio and Gradle, Manage the local and remote dependencies of your projects, Create multiple build variants, Include multiple modules in a single project, Integrate tests into the build process, Create custom tasks and plugins for Android projects, In Detail, Gradle is an open source build automation system that introduces a Groovy-based domain-specific language (DSL) to configure projects. Using Gradle makes it easy for Android developers to manage dependencies and set up the entire build process., This book begins by taking you through the basics of Gradle and how it works with Android Studio. Furthermore, you will learn how to add local and remote dependencies to your project. You will work with build variants, such as debug and release, paid and free, and even combinations of these things. The book will also help you set up unit and integration testing with different libraries and will show how Gradle and Android Studio can make running tests easier. Finally, you will be shown a number of tips and tricks on the advanced customization of your application's build process. By the end of this book, you will be able to customize the entire build process, and create your own tasks and plugins for your Gradle builds.
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值