提高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 的效率. 那么怎么来使用这项新功能呢?你只需要 ...
随机推荐
- Eclipse配置tomcat8.5.7报错:The Apache Tomcat installation at this directory is version 8.5.27. A Tomcat 8.0 installation is...
Eclipse配置tomcat8.5.7报错:The Apache Tomcat installation at this directory is version 8.5.27. A Tomcat ...
- Windows 2008 系统IIS安装配置
win8下安装IIS 1.右键“我的电脑”,选择“管理”,打开“服务器管理 器, 如下图: 2.点击左边菜单栏中的“角色“,弹出角色窗口,如下图: 3. 点击“添加角色”,弹出“添加角色向导”界面,如 ...
- 20145335郝昊《网络对抗》逆向及Bof基础实践
20145335郝昊<网络对抗>逆向及Bof基础实践 1.实践说明 本次实践是对一个名为pwn1的可执行Linux文件进行操作.程序的执行流程是:主函数main调用foo函数,foo将函数 ...
- InstallShieldPro 2015中Basic MSI工程类型如何调用InstallScript脚本
转载:http://blog.csdn.net/mengzhishen/article/details/8953901 这是一个Basic MSI基础知识. A. 首先在Installation De ...
- 一些常用的JavaScript正则表达式
1.正数,最多n位小数 /^(([1-9]\d*(\.\d{1,n})?)|(0\.\d{1,n}))$/ 2.手机号码 /^1[34578]\d{9}$/
- UVa 11889 最小公倍数
https://vjudge.net/problem/UVA-11889 题意: 输入两个整数A和C,求最小的整数B使得lcm(A,B)=C. 思路: 首先C是A的公倍数,如果C%A不为0肯定是无解的 ...
- php 获取某个日期n天之后的日期
<?php $date=date_create("2013-03-15"); date_add($date,date_interval_create_from_date_st ...
- js urlencode
<!doctype html> <html lang="en"> <head> <meta charset="UTF-8&quo ...
- Qt570_CentOS64x64_02
1.Qt570的简单测试项目,在做"重新构建"的操作的时候,出现1个问题,Qt底下的"编译输出"窗口中的信息为: cc1plus: error: unrecog ...
- 雷林鹏分享:JSP 开发环境搭建
JSP 开发环境搭建 JSP开发环境是您用来开发.测试和运行JSP程序的地方. 本节将会带您搭建JSP开发环境,具体包括以下几个步骤. 配置Java开发工具(JDK) 这一步涉及Java SDK的下载 ...