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 ~/MyAPP
and 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
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