Question

When i add platform i am getting this error how to resolve :

C:\Users\SCube\.cordova\lib\android\cordova\3.4.0\bin\node_modules\q\q.js:126
                        throw e;
                              ^
    Error: ERROR : executing command 'ant', make sure you have ant installed and add
    ed to your path.
        at C:\Users\SCube\.cordova\lib\android\cordova\3.4.0\bin\lib\check_reqs.js:4
    7:27
        at ChildProcess.exithandler (child_process.js:641:7)
        at ChildProcess.EventEmitter.emit (events.js:98:17)
        at maybeClose (child_process.js:743:16)
        at Process.ChildProcess._handle.onexit (child_process.js:810:5)
    Error: cmd: Command failed with exit code 8
        at ChildProcess.whenDone (C:\Users\SCube\AppData\Roaming\npm\node_modules\co
    rdova\src\superspawn.js:112:23)
        at ChildProcess.EventEmitter.emit (events.js:98:17)
        at maybeClose (child_process.js:743:16)
        at Process.ChildProcess._handle.onexit (child_process.js:810:5)

Thanks

Was it helpful?

Solution

This error occurs, when your path is not set proper for Android Application.Please follow this BLOG for adding Android Platform in Windows Machine

Can try this also to Setup your PATH environment variable on Windows

  • List item From the Desktop, right-click My Computer and click Properties.

  • Click Advanced System Settings link in the left column.

  • In the System Properties window click the Environment Variables button.

  • Select the PATH variable from the System variables section.

  • Select the Edit button. You need to add the path to your Android SDK platform-tools and tools directory. In my example I will use "C:\Development\android-sdk-windows" as the directory the SDK is installed in. Append the following text into the text box: ;C:\Development\android-sdk-windows\platform-tools;C:\Development\android-sdk-windows\tools

  • Save your edit. Close the Environment Variables dialog.

  • Additionally, you may need to include %JAVA_HOME%\bin to your PATH as well. To check to see if this is required, run a command prompt and type java. If the program can not be found add %JAVA_HOME%\bin to the PATH. You may need to specify the full path instead of using the %JAVA_HOME% environment variable.

  • Finally, you may need to include %ANT_HOME%\bin to your PATH as well. To check to see if this is required, run a command prompt and type ant. If the program can not be found add %ANT_HOME%\bin to the PATH. You may need to specify the full path instead of using the %ANT_HOME% environment variable.

    For More details You can refer HERE

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top