Android : AndroidStudio开发工具优化

本文介绍了如何在Windows系统中配置Gradle的守护进程以提高性能,包括设置daemon、调整JVM内存、查看并修改AndroidStudio的运行内存,以及配置GradleHome和优化首次启动。还提到安装插件来自动化ID生成和JSON解析。
摘要由CSDN通过智能技术生成

1.开启 gradle 单独的守护进程

Windows: 进入目录 

C:\Users\Administrator\.gradle

创建文件:        gradle.properties

# 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

2.查看android Studio 分配的运行内存,手动更改内存配置

File -> settings... 

更改

Help -> Edit Custom Vm Options...   添加   保存退出 重新打开


-Xms256m
-Xmx2048m

3.配置好 Gradle home  

 file->setting->gradle

找到 androidStudio 安装路径

如: E:/AndroidStudio/gradle/gradle-8.0.1 

4 打开时优化  跳过检查sdk 啥的

进入 androidStudio 安卓目录  在bin 目录 找到 idea.properties 文件 在末尾添加:

disable.android.first.run=true

5.安装一些插件 自动生成 id, ,解析JSON 生成实体 等等

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

javaGHui

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值