1

I'm new to Ionic and trying to install it using this tutorial.

Now everything works, I'm 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.

I don't have a clue on how to solve this. I tried to reinstall everything, double checked my environment variables 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.

0

2 Answers 2

2

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

Sign up to request clarification or add additional context in comments.

1 Comment

This cured it for me.
1

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

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.