Skip to content

Invalid maximum heap size: -Xmx16384M #758

@alfredobialo

Description

@alfredobialo

how do i fix This:

C:\Users\USER\WebstormProjects\ngMobile>tns run android

Executing before-prepare hook from C:\Users\USER\WebstormProjects\ngMobile\hooks\before-prepare\nativescript-dev-typescript.js
Found peer TypeScript 2.2.2
Preparing project...
Starting a Gradle Daemon (subsequent builds will be faster)

FAILURE: Build failed with an exception.

    What went wrong:
    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/3.3/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.
Invalid maximum heap size: -Xmx16384M
The specified size exceeds the maximum representable size.

    Try:
    Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

    Starting DaemonProcessing node_modules failed. Error: Command gradlew.bat failed with exit code 1

pakage.json file

{
"description": "NativeScript Application",
"license": "SEE LICENSE IN ",
"readme": "NativeScript Application",
"repository": "",
"nativescript": {
"id": "org.nativescript.AngularMobile",
"tns-android": {
"version": "3.0.0"
}
},
"dependencies": {
"@angular/animations": "~4.1.0",
"@angular/common": "~4.1.0",
"@angular/compiler": "~4.1.0",
"@angular/core": "~4.1.0",
"@angular/forms": "~4.1.0",
"@angular/http": "~4.1.0",
"@angular/platform-browser": "~4.1.0",
"@angular/router": "~4.1.0",
"nativescript-angular": "~3.0.0",
"nativescript-theme-core": "~1.0.2",
"reflect-metadata": "~0.1.8",
"rxjs": "~5.3.0",
"tns-core-modules": "~3.0.0",
"zone.js": "~0.8.2"
},
"devDependencies": {
"babel-traverse": "6.4.5",
"babel-types": "6.4.5",
"babylon": "6.4.5",
"lazy": "1.0.11",
"nativescript-dev-typescript": "~0.4.0",
"typescript": "~2.2.1"
}
}

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