Problem build android in mac

I am having problems trying to generate the apk on my computer mac. Set the path, add the platform and be generating the ionic build android throws the following error:

/Users/lixsys/app_view/platforms/android/cordova/node_modules/q/q.js:126
                throw e;
                      ^
Error: Failed to run "ant -version", make sure you have ant installed and added to your PATH.
at /Users/lixsys/app_view/platforms/android/cordova/lib/check_reqs.js:43:27
at ChildProcess.exithandler (child_process.js:751:5)
at ChildProcess.emit (events.js:110:17)
at maybeClose (child_process.js:1008:16)
at Socket.<anonymous> (child_process.js:1176:11)
at Socket.emit (events.js:107:17)
at Pipe.close (net.js:476:12)
ERROR building one of the platforms: Error: /Users/lixsys/app_view/platforms/android/cordova/build: Command failed with exit code 1
You may not have the required environment or OS to build this project

Install ant.

brew install ant

I can not run brew install ant not understand why. …

brew install ant
-bash: brew: command not found

You need to install homebrew so you can run the brew command.

ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

Homebrew is an OSX package manager. Very useful

1 Like

Yes, if installed now I worked, I was running badly installation. See what happens, you commented. Thanks for your help!