8

Gradle加快编译方法

 3 years ago
source link: https://renyugang.blog.csdn.net/article/details/93593283
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

Gradle加快编译方法

original.png
胖虎 2019-06-25 09:46:09 articleReadEyes.png 2251

1.常见的都是在配置上做手脚 jvm 内存大小,线程数等
2.从根本上优化就是要用到缓存(class 和 resource)

目前有的一些插件有:阿里的freeline(gradle 3.1后用不了) 、instant run (总有莫名其妙的问题)、Jrebel

这边主要讲的是关于Jrebel的,首先Jrebel的配置
在AS中pulugins下添加Jrebel的插件源地址 :
http://dl.zeroturnaround.com/jrebel-android/plugins/ide-studio/updatePlugins.xml

在这里插入图片描述

添加完成后,搜索插件:JRebel , 进行安装重启Android Studio

因为JRebel是收费的,但是小弟实在穷,只能是破解了~破解方式

先去网站上获取一个UUID : https://www.guidgen.com/

在这里插入图片描述

Group URL 格式:http://idea.lanyus.com/ + 我们生成的UUID [如:http://idea.lanyus.com/6cc705e5-e7d0-4b98-ba58-0a980eb0aaf9]
Email : 合法的Email即可

在这里插入图片描述
在这里插入图片描述

激活成功后,就可以体验快感了~

在这里插入图片描述

从左到右边
第一个相当于Android Studio的正常编译(第一次编译运行项目用这个)
第二个相当于Android Studio的调试编译
第三个相当于Android Studio的Instant Run 那个闪电标识

那么和Instant Run的对比有什么区别

在这里插入图片描述

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK