ANDROID_HOME not set error in Ionic framework

I am trying to develop an application using ionic framework in my ubuntu 14.04 system. Eventhough I set ANDROID_HOME in bashrc

ionic build android 

command says that ANDROID_HOME is not set. I am able to run android command from terminal. How should I solve this issue?

just add an environment variable ANDROID_HOME that points to the android sdk path.

On ubuntu just add this to your ~/.bashrc file :

export ANDROID_HOME=/path/to/your/sdk