Skip to content

About gradle jvm args conflict problem: Unknown command-line option '-X'. #4176

@crazyde21

Description

@crazyde21

settings.json
"java.import.gradle.jvmArguments": "-Xmx4g"

When import project, gradle status: Build Error :

[info] Java Home: C:\Program Files\Java\jdk-1.8 [info] JVM Args: --add-opens,java.base/java.util=ALL-UNNAMED,--add-opens,java.base/java.lang=ALL-UNNAMED,--add-opens,java.base/java.lang.invoke=ALL-UNNAMED,--add-opens,java.prefs/java.util.prefs=ALL-UNNAMED,-Xmx4g,-Dfile.encoding=UTF-8,-Duser.country=CN,-Duser.language=zh,-Duser.variant [info] Gradle User Home: C:\Users\CrazyAwei\.gradle [info] Gradle Version: 5.3 [error] Error getting build for c:\workSpace\sp-erp: Could not run build action using connection to Gradle distribution 'https://services.gradle.org/distributions/gradle-5.3-bin.zip'. Problem with provided build arguments: [--init-script, C:\Users\CRAZYA~1\AppData\Local\Temp\6a04067a73fb07ce3752317f20560b6b753f9e355f8679fa62e3e68e92af6797.gradle, -Xmx4g]. Unknown command-line option '-X'. Either it is not a valid build option or it is not supported in the target Gradle version. Not all of the Gradle command line options are supported build arguments. Examples of supported build arguments: '--info', '-p'. Examples of unsupported build options: '--daemon', '-?', '-v'. Please find more information in the javadoc for the BuildLauncher class. [info] Found 0 tasks [info] [gradle-server] [ERROR] Could not run build action using connection to Gradle distribution 'https://services.gradle.org/distributions/gradle-5.3-bin.zip'. Problem with provided build arguments: [--init-script, C:\Users\CRAZYA~1\AppData\Local\Temp\6a04067a73fb07ce3752317f20560b6b753f9e355f8679fa62e3e68e92af6797.gradle, -Xmx4g]. Unknown command-line option '-X'. Either it is not a valid build option or it is not supported in the target Gradle version. Not all of the Gradle command line options are supported build arguments. Examples of supported build arguments: '--info', '-p'. Examples of unsupported build options: '--daemon', '-?', '-v'. Please find more information in the javadoc for the BuildLauncher class.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions