Ionic build android error

On executing: “ionic build android” i am getting the below error.
This is happening for a new blank project created a day back. For old projects i am able to build for android successfully.

*Running command: "C:\Program Files\nodejs\node.exe" "E:\Projects\Fropcorn\Fropcorn Maintenance App\Fropcorn Maintenance App\hooks\after_prepare\010_add_platform_class.js" "E:\Projects\Fropcorn\Fropcorn Maintenance App\Fropcorn Maintenance App"
add to body class: platform-android
Running command: "C:\Program Files\nodejs\node.exe" "E:\Projects\Fropcorn\Fropcorn Maintenance App\Fropcorn Maintenance App\hooks\after_prepare\020_remove_sass_from_platforms.js" "E:\Projects\Fropcorn\Fropcorn Maintenance App\Fropcorn Maintenance App"
Running command: cmd "/s /c ""E:\Projects\Fropcorn\Fropcorn Maintenance App\Fropcorn Maintenance App\platforms\android\cordova\build.bat"""
ERROR building one of the platforms: Error: cmd: Command failed with exit code 2
You may not have the required environment or OS to build this project
Error: cmd: Command failed with exit code 2
    at ChildProcess.whenDone (C:\Users\Kunal\AppData\Roaming\npm\node_modules\cordova\node_modules\cordova-lib\src\cordova\superspawn.js:131:23)
    at ChildProcess.emit (events.js:98:17)
    at maybeClose (child_process.js:756:16)
    at Process.ChildProcess._handle.onexit (child_process.js:823:5)*

I was also facing same kind of problem. I just remove all the platform from project.

Then once restart my pc and then i add platform using cordova and build using cordova as well and it’s works for me.

cordova build android

Hmm, we’ve seen something similar to this as well.

Seems to be on the cordova side of things.

Can any one help me understanding what this error trying to say?

BUILD FAILED
D:\Software\adt-bundle-windows-x86_64-20140702\sdk\tools\ant\build.xml:720: The
following error occurred while executing this line:
D:\Software\adt-bundle-windows-x86_64-20140702\sdk\tools\ant\build.xml:734: Comp
ile failed; see the compiler error output for details.

Total time: 3 seconds

D:\My Work\android\Mandaleshwar\platforms\android\cordova\node_modules\q\q.js:12
6
throw e;
^
Error code 1 for command: cmd with args: /s /c "ant debug -f “D:\My Work\android
\Mandaleshwar\platforms\android\build.xml” -Dout.dir=ant-build -Dgen.absolute.di
r=ant-gen"
ERROR building one of the platforms: Error: cmd: Command failed with exit code 8

You may not have the required environment or OS to build this project
Error: cmd: Command failed with exit code 8
at ChildProcess.whenDone (C:\Users\Yash Photos\AppData\Roaming\npm\node_modu
les\cordova\node_modules\cordova-lib\src\cordova\superspawn.js:131:23)
at ChildProcess.emit (events.js:98:17)
at maybeClose (child_process.js:756:16)
at Process.ChildProcess._handle.onexit (child_process.js:823:5)