[SOLVED] Mac os x "El capitan" - ionic build android not working

Hello everyone, I have already installed once the framework, for a test, on a Linux machine and, following the official guide, I was able to installing it and to compile and emulate (android) the basic application.
Now I followed the same procedure on my macbook pro, following guides available on from here http://ionicframework.com/getting-started/

installed node v5 for Mac and then
npm install -g cordova ionic gulp
brew install Android SDK
brew install ant

in my home directory I changed my .bash_profile adding the correct path for JAVA_HOME and ANDROID_HOME. This is the content of my file

export JAVA_HOME = $ (/ usr / libexec / java_home)
export PATH = $ {JAVA_HOME} / bin: $ PATH
export PATH = / usr / local / bin: $ PATH
export ANDROID_HOME = / usr / local / opt / android-sdk
export PATH = $ {ANDROID_HOME} / bin: $ PATH

From Shell I can run these commands:

java -version
java version "1.7.0_80"
Java ™ SE Runtime Environment (build 1.7.0_80-b15)
Java HotSpot ™ 64-Bit Server VM (build 24.80-b11, mixed mode)

javac -version
javac 1.7.0_80

ant -version
Apache Ant ™ version 1.9.6 compiled on June 29, 2015

ionic info
Your system information:

Cordova CLI: 5.3.3
Gulp version: CLI version 3.9.0
Gulp local:
Ionic CLI Version: 1.7.8
Ionic Lib App Version: 0.6.4
ios-deploy version: Not installed
ios-sim Version: 5.0.3
OS: Mac OS X El Capitan
Node Version: v5.0.0
Xcode version: Xcode 7.1 Build version 7B91b

Dependency warning - for the CLI to run correctly,
it is highly suggested to install / upgrade the Following:

Install ios-deploy to deploy applications to iOS devices. Npm install -g ios-deploy (may require sudo)

Even from the terminal I launched the command “Android” and then I installed
android-sdk-tools and android-sdk-platform-tools and android-sdk-build tools

Finally the commands given to create the basic design:
ionic start test-project sidemenu
cd test-project
ionic platforms add Android
ionic build Android (no output and no errors. Simply returns to command prompt)
ionic emulated Android (no output and no errors. Simply returns to command prompt)

I can not deal with them. What am I forgetting?
Thanks a lot

1 Like

This is happening to me on Windows, exact same problem! I’ve followed these instructions in the past and not had problems, so I’m thinking that there must be a software problem somewhere. Is there a way to debug or show verbose instructions when “ionic build android” runs?

Turns out it’s because of node.js version 5, install version 4 and it’ll work.

Thank you very much!
I think that should be saint immediately!

I’m having the same issue. I still get the following messages after i’ve got everything setup:
Error: Failed to run “javac -version”, make sure that you have a JDK installed.
You can get it from: http://www.oracle.com/technetwork/java/javase/downloads.
Your JAVA_HOME is invalid: /Library/Java/JavaVirtualMachines/jdk1.8.0_102.jdk/Contents/Home

I have tried many versions of jdk and node and yet there was no success.

Could anyone please point me to the right direction?

This is my ionic info:

Cordova CLI: 6.3.0
Gulp version: CLI version 3.9.1
Gulp local:
Ionic Framework Version: 1.3.1
Ionic CLI Version: 1.7.16
Ionic App Lib Version: 0.7.3
ios-deploy version: Not installed
ios-sim version: 3.1.1
OS: Mac OS X El Capitan
Node Version: v4.4.7
Xcode version: Xcode 7.3.1 Build version 7D1014