gpt4 book ai didi

java - Gradle 获得未知的 JVM 选项

转载 作者:行者123 更新时间:2023-12-02 11:58:47 25 4
gpt4 key购买 nike

当我尝试将 gradle 项目导入 eclipse IDE 时,出现此错误:

我不知道为什么它会给我带来如下错误:

Error: Could not create the Java Virtual Machine.

Error: Invalid maximum heap size: -Xmx4g

我从未指定过像 -Xmx4g 这样的选项。我不知道它们是从哪里来的?

Synchronize Gradle projects with workspace failed due to an error connecting 
to the Gradle build.
Could not run build action using Gradle distribution 'https://services.gradle.org/distributions/gradle-4.3.1-bin.zip'.

Unable to start the daemon process.
This problem might be caused by incorrect configuration of the daemon.
For example, an unrecognized jvm option is used.
Please refer to the user guide chapter on the daemon at https://docs.gradle.org/4.3.1/userguide/gradle_daemon.html
Please read the following process output to find out more:
-----------------------
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.
Java HotSpot(TM) Client VM warning: ignoring option MaxPermSize=4g; support was removed in 8.0
Invalid maximum heap size: -Xmx4g
The specified size exceeds the maximum representable size.

最佳答案

这似乎是 Gradle Daemon 问题。

您可以通过将以下行添加到 gradle.properties 中来配置它:

org.gradle.jvmargs=-Xmx512m

让我知道进展如何。

关于java - Gradle 获得未知的 JVM 选项,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47408636/

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