Ionic framework 失败:生成失败,出现异常。离子的
我正在尝试构建一个IONIC项目,但我遇到了此异常,无法调试解决方案。我尝试了很多建议,但没有解决方案。我正在等待您的帮助Ionic framework 失败:生成失败,出现异常。离子的,ionic-framework,cmd,Ionic Framework,Cmd,我正在尝试构建一个IONIC项目,但我遇到了此异常,无法调试解决方案。我尝试了很多建议,但没有解决方案。我正在等待您的帮助 1-ionic start test4 tabs 2-cd test4 3-ionic platform add android 4-ionic build android 错误 C:\Users\onurr\test4>ionic build android Running command: "C:\Pr
1-ionic start test4 tabs
2-cd test4
3-ionic platform add android
4-ionic build android
错误
C:\Users\onurr\test4>ionic build android
Running command: "C:\Program Files\nodejs\node.exe"
C:\Users\onurr\test4\hooks\after_prepare\010_add_platform_class.js
C:\Users\onurr\test4
add to body class: platform-android
ANDROID_HOME=C:\Users\onurr\AppData\Local\Android\sdk
JAVA_HOME=C:\Program Files (x86)\Java\jdk1.8.0_112
Subproject Path: CordovaLib
Starting a new Gradle Daemon for this build (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/2.14.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 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.gradle.org/2.14.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 2097152KB object heap
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
我假设您正在使用Windows查看堆栈跟踪 请注意堆栈跟踪中的以下消息:
Error occurred during initialization of VM
Could not reserve enough space for 2097152KB object heap
当您有32位JVM时,通常会发生这种情况。如果您的操作系统是64位的,请将32位JVM替换为64位JVM。它具有更高的堆约束,可以解决这个问题。这是推荐的解决方案
阅读本文了解更多信息
如果您的操作系统是32位的,请尝试按以下方式设置您的操作系统,然后重新发出ionic build android
命令(可能需要重新启动命令提示符):
转到Start
→ <代码>控制面板→ <代码>系统→ <代码>高级系统设置→ <代码>高级(选项卡)→ <代码>环境变量→ <代码>系统变量→ <代码>新建:
Variable name: _JAVA_OPTIONS
Variable value: -Xmx512M
我假设您正在使用Windows查看堆栈跟踪 请注意堆栈跟踪中的以下消息:
Error occurred during initialization of VM
Could not reserve enough space for 2097152KB object heap
当您有32位JVM时,通常会发生这种情况。如果您的操作系统是64位的,请将32位JVM替换为64位JVM。它具有更高的堆约束,可以解决这个问题。这是推荐的解决方案
阅读本文了解更多信息
如果您的操作系统是32位的,请尝试按以下方式设置您的操作系统,然后重新发出ionic build android
命令(可能需要重新启动命令提示符):
转到Start
→ <代码>控制面板→ <代码>系统→ <代码>高级系统设置→ <代码>高级(选项卡)→ <代码>环境变量→ <代码>系统变量→ <代码>新建:
Variable name: _JAVA_OPTIONS
Variable value: -Xmx512M
很乐意帮忙!;)很乐意帮忙!;)