2017-03-13 11 views
1

私はIONICプロジェクトを構築しようとしていますが、この例外に直面しています。このためにソリューションをデバッグできません。多くの提案をしましたが、解決策はありませんでした。あなたの助けを待っています。FAILURE:例外が発生してビルドに失敗しました。 Ionic

1-ionic start test4 tabs 
    2-cd test4 
    3-ionic platform add android 
    4-ionic build android 

ERROR

 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. 

答えて

3

私はあなたのスタックトレースを見ているのWindowsを使用していると仮定しています。あなたのスタックトレースで、このメッセージに

ご注意:

Error occurred during initialization of VM 
Could not reserve enough space for 2097152KB object heap 

あなたは32ビットのJVMを持っているとき、これは通常起こります。 OSが64ビットの場合は、32ビットJVMを64ビットJVMに置き換えてください。より高いヒープ制約を持ち、問題を解決します。これが推奨されるソリューションです。

詳細はoracle documentationをお読みください。

お使いのOSが32ビットの場合は、次のようにお使いのOSをセットアップしようとすると、(コマンドプロンプトを再起動する必要がある場合があります)ionic build androidコマンドを再発行:

Go]をStartControl PanelSystemAdvanced System SettingsAdvanced (tab)Environment Variables →へSystem VariablesNew

Variable name: _JAVA_OPTIONS 
Variable value: -Xmx512M 
+0

ありがとう:)感謝しています。私の問題を解決しました –

+0

喜んで助けてください! ;) –

関連する問題