Ionic mobile app - build error

I have installed all required components/frameworks/module for ionic mobile development. I started the default 'todo' project and facing errors while building the app. I haven't added any custom code.The project contains the default code. How can I troubleshoot build errors.

I installed IntelliJ. The same build error comes there too.Howeve IntellIJ also not helpful to find out root cause.

I am getting the below error:

BUILD FAILED
C:\android\sdk\tools\ant\build.xml:932: The following error occurred while executing this line:
C:\android\sdk\tools\ant\build.xml:950: null returned: -1073741819

Total time: 4 seconds

C:\My-DEV\todo\platforms\android\cordova\node_modules\q\q.js:126
                    throw e;
                          ^
Error code 1 for command: cmd with args: /s,/c,ant,debug,-f,C:\My-DEV\todo\platforms\android\build.xml,-Dout.dir=ant-build,-Dgen.absolute.dir=ant-gen
Error: C:\My-DEV\todo\platforms\android\cordova\run.bat: Command failed with exit code 8
    at ChildProcess.whenDone (C:\Users\amarnath\AppData\Roaming\npm\node_modules\cordova\node_modules\cordova-lib\src\cordova\superspawn.js:135: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)

Please help me to fix the issue.