gpt4 book ai didi

android - 更改 org.gradle.jvmargs 的值可修复 "This problem might be caused by incorrect configuration of the daemon."错误

转载 作者:行者123 更新时间:2023-12-03 05:39:15 26 4
gpt4 key购买 nike

我按照本教程使用 Google 日历 API:https://developers.google.com/calendar/quickstart/java我不得不运行这个命令:

gradle init --type basic

当我这样做时,我收到了这个错误:

Unable to start the daemon process.
This problem might be caused by incorrect configuration of the daemon.



我在这个问题中找到了 Android Studio Gradle project "Unable to start the daemon process /initialization of VM" ,答案是将此行添加到 gradle.properties 文件的末尾:
org.gradle.jvmargs=-Xmx1024m

但是,它给了我一个错误,因为我已经设置了该属性,但是设置了不同的值,如下所示:
org.gradle.jvmargs=-Xmx1536m

我重新运行了 gradle 命令而没有错误,并且能够继续。

这个问题在大约 4 年前就得到了回答。我的项目是本周的新项目。为什么我必须使用旧版本才能使其正常工作?另外,当我将 org.gradle.jvmargs 的值切换到另一个值时,到底发生了什么?

最佳答案

此设置控制堆内存的大小,可用于 Gradle daemon

同时1024M是默认值(有时 512M 可能是默认值)。

我有一个项目,需要5084M build 。当它太少时它通常会提示

... 至少在设置选项 -XX:+HeapDumpOnOutOfMemoryError 时.

关于android - 更改 org.gradle.jvmargs 的值可修复 "This problem might be caused by incorrect configuration of the daemon."错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54204829/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com