"Ionic build android" error

I'm new to Ionic and trying to install it using this tutorial: http://ionicframework.com/docs/guide/installation.html

Now everything works, im able to create a project and add a platform but when i try to run the command "ionic build android" i get this error:

enter image description here

I ran the ant debug command but it doesn't work.

Id really like to get started (it's rather urgent) but I don't have a clue on how to solve this. I tried to reinstall everything, double checked my environment variabeles and removed and added the android platform again, but nothing works. I also tried some of the other solutions posted here in some related topics but it seems my error here is still a little bit different. All help would be greatly appreciated! :)

Cheers guys!

I guess it's because you set ANDROID_HOME to the wrong path.

ANDROID_HOME must be set to the root of the android SDK, not to tools folder:

SET ANDROID_HOME=C:\adt-bundle-windows-x86_64-20140702\sdk

But the tools folder must be in the path.

SET PATH=%PATH%;%ANDROID_HOME%\tools

(use windows settings to set env vars, don't do it in cmd, that was just to explain more clearly)

Answer Source

Just follow this video, you have to set your path correctly.

http://learn.ionicframework.com/videos/windows-android/

1: Download and Install Java then open your system environment variables, and add to or create a new user variable called PATH with the full path to the bin folder of the new Java SDK installation.

2: Download Apache Ant then add the full path to the bin/ folder to the end of your PATH environment variable.

3: Add Android to PATH :Open up your environment variables setting and add the full path to both the adt-bundle/sdk/platform-tools/ folder and the adt-bundle/sdk/tools/ folder to the end of your PATH variable:

4.Install nodeJs and now you can do

 npm install -g cordova ionic