当前位置: 首页 > 工具软件 > space-daemon > 使用案例 >

idea引入gradle项目 出现堆空间耗尽Expiring Daemon because JVM heap space is exhausted Daemon will be stopped at

樊飞飙
2023-12-01

1、简诉:

	idea引入gradle项目 出现堆空间耗尽Expiring Daemon because JVM
	heap space is exhausted Daemon will be stopped at

2、错误详情:

Starting Gradle Daemon...
Gradle Daemon started in 1 s 569 ms
> Task :prepareKotlinBuildScriptModel UP-TO-DATE
Expiring Daemon because JVM heap space is exhausted
Daemon will be stopped at the end of the build after running 
out of JVM memory

解决方式:

仓库地址无法连接到
系统maven
收集的其他方式:

//添加gradle.properties 文件
#开启线程守护,第一次编译时开线程,之后就不会再开了
org.gradle.daemon=true
#配置编译时的虚拟机大小
org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8
#开启并行编译,相当于多条线程再走
org.gradle.parallel=true
#启用新的孵化模式
org.gradle.configureondemand=true
 类似资料: