首页 文章

cordova构建android - 失败

提问于
浏览
0

当我试图在离子框架v1上运行cordova build android命令时,我遇到了以下错误 . 请帮我

$ ionic cordova构建android

离子cordova准备√cordova准备 - 完成!运行命令:“C:\ Program Files \ nodejs \ node.exe”C:\ mobileproject \ DatasoftwareApp \ hooks \ after_prepare \ 010_add_platform_class.js C:\ mobileproject \ Data softwareApp添加到body类:platform-android×cordova build android - 失败! [错误]运行cordova build android时出错(退出代码1):

Running command: "C:\Program Files\nodejs\node.exe" C:\mobileproject\Dat                         aRecoverysoftwareApp\hooks\after_prepare\010_add_platform_class.js C:\mobileproj                         ect\DataRecoverysoftwareApp
    add to body class: platform-android
    ANDROID_HOME=C:\Users\amit.joshi\AppData\Local\Android\sdk
    JAVA_HOME=C:\Program Files (x86)\java\jdk1.8.0_151
    Subproject Path: CordovaLib
    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.gra                         dle.org/3.3/userguide/gradle_daemon.html
    Please read the following process output to find out more:
    -----------------------
    Error occurred during initialization of VM
    Could not reserve enough space for 2097152KB object heap


    * Try:
    Run with --stacktrace option to get the stack trace. Run with --info or                          --debug option to get more log output.
    Error: cmd: Command failed with exit code 1 Error output:
    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.gra                         dle.org/3.3/userguide/gradle_daemon.html
    Please read the following process output to find out more:
    -----------------------
    Error occurred during initialization of VM
    Could not reserve enough space for 2097152KB object heap


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

1 回答

  • 1

    初始化VM时出错无法为2097152KB对象堆保留足够的空间

    看起来它无法分配空间 . 您是否有机会使用32位Java版本?如果是,请尝试64位 .

    你记忆力不好吗?

相关问题