• Skip to main content
  • Skip to primary sidebar

Founder at work

Master the skills to create and launch your next SaaS company

  • About Me
  • Reviews
  • Resources
  • Community
  • Contact
  • Lessons
  • Series
  • Search
  • Login

Ionic can’t run android platform ‘ANDROID_HOME is not set and “android” command not in your PATH’

December 14, 2014 by Rick Hernandez Leave a Comment

Android SDK Setup on a mac
Android SDK Setup on a mac

The problem

I recently built an app using the ionic framework, using one of my Linux machines and it worked fairly straight forward. But recently I decided to upgrade to a mac pro and let’s just say things get a bit more complicated to make IONIC work. My console was throwing a nasty error like this

The solution

First you have to figure out where you installed the android SDK, I did not use the java eclipse package for android development but instead I went with the new google IDE android studio, now if you installed this application you probably grabbed it and installed at your applications folder this can be found at /Applications/Android\ Studio.app/ now you have to let your shell know about the location, this can be done by editing this file ~/.bash_profile or if you are using zsh it would be .zshrc.

Write the changes

Go the end of the file and add

Save the file
Compile the source file source ~/.zshrc
Go to application folder cd ~/MyAPPand run the following command ionic platform add android
Give it a shot ionic emulate android

NOTE: If for whatever reason the SDK does not show up in this directory /Applications/Android\ Studio.app/SDK/ Check here instead and the copy over the files if it does exist

Rick Hernandez

I always had a passion for the field of STEM (Science, Technology, Engineering, and Math) and I knew I wanted to do something to make a difference in the world. I just didn’t know where to start. I was an immigrant in a new country, grew up in a tough environment, and wasn’t sure how… Read More

Share this:

  • Click to share on Twitter (Opens in new window)
  • Click to share on Facebook (Opens in new window)

Related

Filed Under: JavaScript, Programming

Primary Sidebar

Learn How To Take Your Idea And Convert It Into An App From Scratch Even If You Have Never Written A Single Line Of Code.

  • How to Find Your Next Great App Idea
  • The Secret To Getting PAID To Build Your Own App
  • How To Create Your App (SaaS, Mobile, VR, AR, Game)
  • How To Monetize Your Apps
Learn More
4.82 Ratings

Copyright © 2025 · JSecademy Blog Theme on Genesis Framework · WordPress · Log in