Java Gradle获得了未知的JVM选项

Java Gradle获得了未知的JVM选项,java,eclipse,gradle,jvm,buildship,Java,Eclipse,Gradle,Jvm,Buildship,当我尝试将gradle项目导入eclipse IDE时,出现以下错误: 我不知道为什么它会让我犯这样的错误: 错误:无法创建Java虚拟机 错误:无效的最大堆大小:-Xmx4g 我从未指定过像-Xmx4g这样的选项。我不知道它们是从哪里来的 Synchronize Gradle projects with workspace failed due to an error connecting to the Gradle build. Could not run build action usi

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

我不知道为什么它会让我犯这样的错误:

错误:无法创建Java虚拟机

错误:无效的最大堆大小:-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.

问题似乎是最大堆大小无效:-Xmx4g


有关要设置的最大大小的更多信息,请查看此答案。问题似乎是最大堆大小无效:-Xmx4g


查看此答案,了解有关要设置的最大大小的更多信息。这似乎是一个Gradle守护程序问题

您可以通过在
gradle.properties
中包含以下行来配置它:

org.gradle.jvmargs=-Xmx512m

让我知道进展如何。

这似乎是一个Gradle守护进程问题

您可以通过在
gradle.properties
中包含以下行来配置它:

org.gradle.jvmargs=-Xmx512m

告诉我进展如何。

我愿意删除此选项。事实上,我不知道为什么它会被选中,我不记得在任何地方设置了这个选项。关于如何删除它有什么想法吗?在eclipse中,请检查运行配置或检查您的gradle属性文件,如果没有将vm arg-Xmx添加到您需要的某个值,则会提到4g。我愿意删除此选项。事实上,我不知道为什么它会被选中,我不记得在任何地方设置了这个选项。关于如何删除它有什么想法吗?在eclipse中,请检查运行配置或检查gradle属性文件,如果没有将vm arg-Xmx添加到您需要的某个值,则会提到4g。如何进行导入,任何引用?如何进行导入,任何引用?