提高Android Studio的Build速度实践
1.在下面的目录创建gradle.properties文件
/home/<username>/.gradle/ (Linux)
/Users/<username>/.gradle/ (Mac)
C:\Users\<username>\.gradle (Windows)
在文件夹中添加
# Project-wide Gradle settings. # IDE (e.g. Android Studio) users:
# Settings specified in this file will override any Gradle settings
# configured through the IDE. # For more details on how to configure your build environment visit
# http://www.gradle.org/docs/current/userguide/build_environment.html # The Gradle daemon aims to improve the startup and execution time of Gradle.
# When set to true the Gradle daemon is to run the build.
# TODO: disable daemon on CI, since builds should be clean and reliable on servers
org.gradle.daemon=true # Specifies the JVM arguments used for the daemon process.
# The setting is particularly useful for tweaking memory settings.
# Default value: -Xmx10248m -XX:MaxPermSize=256m
org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8 # When configured, Gradle will run in incubating parallel mode.
# This option should only be used with decoupled projects. More details, visit
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
org.gradle.parallel=true # Enables new incubating mode that makes Gradle selective when configuring projects.
# Only relevant projects are configured which results in faster builds for large multi-projects.
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:configuration_on_demand
org.gradle.configureondemand=true
以上配置的目的: 增大gradle运行的java虚拟机的大小,让gradle在编译的时候使用独立进程,让gradle可以平行的运行。
2. Android studio中配置
开启offline模式


提高Android Studio的Build速度实践的更多相关文章
- android studio Gradle Build速度加快方法
设置离线编译就可以解决这个问题了.如下图所示:
- 加快Android Studio的编译速度
从Eclipse切换到Android Studio后,感觉Android Studio的build速度比Eclipse慢很多,以下几个方法可以提高Android Studio的编译速度 使用Gradl ...
- 【转】实践最有效的提高Android Studio运行、编译速度方案
原文:https://blog.csdn.net/xwh_1230/article/details/60961723 实践最有效的提高Android Studio运行.编译速度方案 最有效提升Andr ...
- 解决Android Studio Gradle Build Running慢的问题
Android Studio方便好用,但是Android Studio Gradle Build Running很慢 解决方法: C:\Users\你的用户名\.gradle 目录下新建一个文件名为 ...
- 解决Android Studio Gradle Build特别慢的问题
解决Android Studio Gradle Build 特别慢的问题 C:\Users\你的用户名\.gradle目录下新建一个文件名为gradle.properties的文件.内容为:org.g ...
- Android Studio 的 build 过程
如图, 编译器将源代码(包括 Application Module 及其所依赖的所有 Library 源代码)转换成 DEX(Dalvik Executable)文件(其中包括运行在 Android ...
- Android Studio优化编译速度
随着Android Studio的不断完善,其安卓开发者阵营也基本从Eclipse转移到了Android Studio,毕竟Android Studio是谷歌亲力亲为开发的官方开发软件.不过其最重要的 ...
- 本地搭建 Gradle 服务器,提高 Android Studio Gradle 下载速度
AndroidStudio 更新以后,在公司网会卡在下载 Gradle 的地方,下载 Gradle 速度很慢. 看到别人的博客提供的解决办法本地搭建一个 Gradle 的服务器,然后把 Android ...
- 加速 Android Studio 的编译速度 2.2
Android studio 2.2 当中有一项新的功能:Dex In Process. 这项功能可以动态的加快编译速度,以及提高Instant Run 的效率. 那么怎么来使用这项新功能呢?你只需要 ...
随机推荐
- php 用户向微信发送信息
1:制作微信菜单栏 <?phpheader("Content-type: text/html; charset=utf-8");function request_post($ ...
- Python3:sqlalchemy对sybase数据库操作,非sql语句
Python3:sqlalchemy对sybase数据库操作,非sql语句 # python3 # author lizm # datetime 2018-02-01 10:00:00 # -*- c ...
- Python3.x:函数定义
Python3.x:函数定义 1,函数定义: def 函数名称([参数1,参数2,参数3......]): 执行语句 2,实例一(不带参数和没返回值): def helloWorld(): print ...
- 2017-2018-1 JaWorld 第三周作业
2017-2018-1 JaWorld 第三周作业 团队展示 队员学号 队名 团队项目描述 队员风采 团队的特色 团队合照 团队初步合作 前两周的反思与总结 需要改进的地方 团队选题 *采访老师或有开 ...
- Ubuntu Budgie 18.04 是最好的Remix【转】
本文转载子:https://www.linuxidc.com/Linux/2018-05/152223.htm [日期:2018-05-05] 来源:Linux公社 作者:醉落红尘 [字体:大 中 ...
- apm的学习资料
百度搜索 apm博客园 实现自己的APM http://www.cnblogs.com/Kevin-moon/archive/2009/02/23/1395039.html 异步机制,一共5篇文 ...
- AJAX,JSON,GSON
AJAX将数据使用JSON格式发送给后端Servlet或其他语言解析. 对JSON内容使用GSON外扩展包进行分解,并使用(如查询用户名是否已经被注册), 最后使用Map集合设置新的返回状态码,并使用 ...
- POJ 2391 Ombrophobic Bovines(二分+拆点+最大流)
http://poj.org/problem?id=2391 题意: 给定一个无向图,点i处有Ai头牛,点i处的牛棚能容纳Bi头牛,求一个最短时间T,使得在T时间内所有的牛都能进到某一牛棚里去. 思路 ...
- windows下hadoop安装配置(转载)
Windows平台安装配置Hadoop 步骤: 1. JDK安装(不会的戳这) 2. 下载hadoop2.5.2.tar.gz,或者自行去百度下载. 3. 下载hadooponwindows-mast ...
- Numpy 练习题
1. 使用循环和向量化两种不同的方法来计算 100 以内的质数之和. 先定义个判断质数的函数.ps:纯手工打造,原生态,哈哈. def checkprime(x): if x<=1: retur ...