分配更大的存储空间提高速度
1.配置全局的gradle的
2.查找gradle.properties文件路径
我的是mac环境在home目录下的.gradle文件夹下,如果没有新建gradle.properties
3.设置内容# Project-wide Gradle settings.
# IDE (e.g. Android Studio) users:
# Gradle settings configured through the IDE *will override*
# any settings specified in this file.
# For more details on how to configure your build environment visit
# http://www.gradle.org/docs/current/userguide/build_environment.html
# 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
org.gradle.daemon=true
org.gradle.configureondemand=true
org.gradle.jvmargs=-Xmx4096m
org.gradle.java.home=/Applications/Android Studio.app/Contents/jre/jdk/Contents/Home
4.注意事项
具体的项目下面的buuld.gradle文件配置,里面的javaMaxHeapSize要比上面的org.gradle.jvmargs=-Xmx4096m小
dexOptions {
dexInProcess = true
javaMaxHeapSize “3g"
preDexLibraries = false
incremental true
}
点击查看更多内容
7人点赞
评论
共同学习,写下你的评论
评论加载中...
作者其他优质文章
正在加载中
感谢您的支持,我会继续努力的~
扫码打赏,你说多少就多少
赞赏金额会直接到老师账户
支付方式
打开微信扫一扫,即可进行扫码打赏哦