当前位置: 首页 > 知识库问答 >
问题:

cordova构建android-失败

姬博瀚
2023-03-14

当我试图在离子框架v1上运行科尔多瓦构建Android命令时,我面临以下错误。请帮助我

离子科尔多瓦构建Android

离子科尔多瓦准备√科尔多瓦准备-完成!运行命令:"C:\Program Files\nodejs\node.exe"C:\obileproject\DatasoftwareApp\钩子\after_prepare\010_add_platform_class.jsC:\obileproject\Data softwareApp添加到正文类:平台-Android×科尔多瓦构建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个答案

袁华清
2023-03-14

初始化VM时出错

无法为2097152KB对象堆保留足够的空间

看起来它无法分配空间。您是否碰巧使用了32位java版本?如果是,请尝试64位。

你记性不好吗?

 类似资料:
  • 我正在linux 14.04操作系统上工作,并使用Cordova开发跨平台移动应用程序 我的系统信息是 Cordova CLI: 6.1.1 Ionic CLI版本: 1.7.14 Ionic App Lib版本: 0.7.0 操作系统:经销商ID: Ubuntu描述: Ubuntu 14.04.4 LTS 节点版本: v5.10.1 我安装了API 20、21、22、23和24所需的所有andr

  • 我刚刚创建了一个简单的离子cordova项目,添加了一些插件。当我运行离子科尔多瓦构建机器人 我收到以下生成错误: 失败:构建失败,但有例外。 > 出了什么问题:任务“:app:进程执行失败”。 清单合并失败:使用sdk:minSdkVersion 16不能小于库[:CordovaLib]C:\Users\Ralph Marvin\Desktop\Marvix\Apps\Ionic\Chapel\

  • 科尔多瓦要求输出: Android需求检查结果:Java JDK:已安装1.8.0 Android SDK:已安装真实Android目标:已安装android-27、android-26、android-24、android-23 gradle:已安装/applications/Android Studio.app/contents/gradle/gradle-4.4/bin/gradle iOS

  • 我是不是漏掉了什么?

  • 请帮我解决这个问题。我不知道如何解决这个问题,因为我已经尝试了我所知道的所有方法,但我仍然得到一个梯度错误。 我已经添加了新的系统变量名:_java_options,值:-xmx512m。错误仍然是一样的。如果可以请帮帮我。

  • 我正在尝试构建我的cordova应用程序,但出现以下错误。此时不确定要尝试什么或此错误的含义。任何帮助都将不胜感激。 CordovaLib: check DebugManifedUP-TO-DATE: CordovaLib: GenerateDebugBuildConfig UP-TO-DATE: CordovaLib: preareLintJar UP-TO-DATE: CordovaLib: