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

构建Cordova PhoneGap时发生VM错误

乌靖
2023-03-14

当我试图创建一个Cordova PhoneGap应用程序时,在最后一步中,当我使用build命令时,我得到了这个错误

cordova build android

我得到了这个错误:

    
D:\rmapp>cordova run android
Running command: D:\rmapp\platforms\android\cordova\run.bat
ANDROID_HOME=D:\Android\sdk
JAVA_HOME=C:\Program Files (x86)\Java\jdk1.7.0_71
WARNING : No target specified, deploying to device '192.168.56.100:5555'.
Running: D:\rmapp\platforms\android\gradlew cdvBuildDebug -b D:\rmapp\platform
s\android\build.gradle -PcdvBuildArch=x86 -Dorg.gradle.daemon=true

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 http://gradle.org/docs/2
.2.1/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 object heap
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.


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

D:\rmapp\platforms\android\cordova\node_modules\q\q.js:126
                    throw e;
                          ^
Error code 1 for command: cmd with args: /s /c "D:\rmapp\platforms\android\grad
lew cdvBuildDebug -b D:\rmapp\platforms\android\build.gradle -PcdvBuildArch=x86
 -Dorg.gradle.daemon=true"
ERROR running one or more of the platforms: Error: D:\rmapp\platforms\android\c
ordova\run.bat: Command failed with exit code 1
You may not have the required environment or OS to run this project

共有1个答案

袁谭三
2023-03-14

您的系统不能为jvm提供足够的连续内存空间,从而导致问题。

以下是对我有效的方法:

添加一个环境变量gradle_opts,其值为-dorg.gradle.jvmargs=-xmx512m

 类似资料:
  • 我正在unity3d 5.3.5上开发android应用程序,我在将应用程序构建到apk时没有遇到任何问题。我添加了windows模块,将项目切换到windows,并成功构建了项目。我切换回Android系统,当我尝试构建项目时,我发现了错误: > 错误构建播放器:反射类型加载异常:模块中的类无法加载。 反射类型加载异常:模块中的类无法加载。系统。反射。汇编。GetTypes()(在 /Users

  • 我试图从android studio构建签名的APK,但我遇到了这个错误。当我在设备上正常运行应用程序时,它的工作文件也可以正常工作,当我生成调试模式apk时。请提出可能的问题。谢谢 错误 (http://proguard.sourceforge.net/manual/troubleshooting.html#unknownclass)注意:有1个对未知类成员的引用。您应该检查您的配置是否有错别字

  • 我不知道该怎么办!感谢任何帮助! 另外,我是否应该在安装HBase之前配置Zookeeper?我的教程没有这么说。

  • 问题内容: 我是java和Storm的新手,所以请原谅任何明显的错误。我正在尝试通过水槽连接器进行风暴,但是由于以下错误而崩溃: 我的pom文件 您能解释一下我在想什么吗? 问题答案: 关键似乎在这里: 这似乎是由于使用的版本引起的。您是否尝试过降级到版本? 分支3.3包含嵌套类NIOServerCnxn $厂 ,但分支3.4有NIOServerCnxnFactory代替

  • 问题内容: 尝试为Rails 安装gem 时遇到一些问题。当我尝试通过运行安装它时,或者出现以下错误: 安装mysql2时出错:错误:无法构建gem本机扩展。 如何解决此问题并成功安装? 问题答案: 在Ubuntu / Debian和其他使用aptitude的发行版上: 软件包已被淘汰,并由代替。这是我找到解决方案的地方。 如果上述命令由于找不到而无法使用,则以下内容就足够了: 在Red Hat

  • 当我在phoenix中登录sqlline.py或试图通过API在phoenix中创建表时,我会遇到一个异常。 由于我对phenix的知识有限,我无法弄清楚为什么phoenix在创建System.Catalog表之前就要检查它。 StackTrace: *4/11/18 06:07:18警告客户端。HConnectionManager$HConnectionImplementation:预取元表时遇