Compilation issues with ionic

I am having trouble building my ionic app. It seems to fails in the dex module during the build process. I have tried re-installing Java,Android sdk,Android studio,ionic,cordova, but the issue persists.
OS: Windows 7 32 bit.
Below is the error I get



      [dex] input: C:\Users\girish\ionic\todo\platforms\android\ant-build\classes
      [dex] input: C:\Users\girish\ionic\todo\platforms\android\CordovaLib\ant-build\classes.jar
      [dex] Pre-Dexing C:\Users\girish\ionic\todo\platforms\android\CordovaLib\ant-build\classes.jar -> classes-a66d72a21376b211a56149a8fc20cd01.jar
       [dx] The system cannot find the path specified.
    C:\Users\girish\AppData\Local\Android\sdk\tools\ant\build.xml:892: The following error occurred while executing this line:
    C:\Users\girish\AppData\Local\Android\sdk\tools\ant\build.xml:894: The following error occurred while executing this line:
    C:\Users\girish\AppData\Local\Android\sdk\tools\ant\build.xml:906: The following error occurred while executing this line:
    C:\Users\girish\AppData\Local\Android\sdk\tools\ant\build.xml:283: null returned: 1

Total time: 2 seconds

                    throw e;
Error code 1 for command: cmd with args: /s,/c,ant,debug,-f,C:\Users\girish\ionic\todo\platforms\android\build.xml,-Dout.dir=ant-build,-Dgen.absolute.dir=ant-gen
Error: C:\Users\girish\ionic\todo\platforms\android\cordova\build.bat: Command failed with exit code 8
    at ChildProcess.whenDone (C:\Users\girish\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)

I’m not sure what your erros means, it’s giving no real error message…

I’ve received similair errors on my own project, so try following things:

  • Make sure all your code is valid, syntactically incorrect code gave me exit code 1 and exit code 8 together before.

If that doesn’t work:

  • remove and add platform (s), this worked on a particulair instance for me (it probably forced to build clean or something like that)

I just created a new project in ionic and built it while i got the error. No custom code added.
I even uninstalled ionic and cordova and re-installed but no luck.