I am trying to build android apk using ionic framework. When I enter the following command sudo ionic build android , I get the following error "Error: Failed to find 'ANDROID_HOME' environment variable. Try setting setting it manually. Failed to find 'android' command in your 'PATH'. Try update your 'PATH' to include path to valid SDK directory. " .
But when I check ANDROID_HOME variable by typing "echo $ANDROID_HOME" , I get the valid SDK path( e.g. /home/ttnd/android-sdk-linux ) .
Find below the configuration that I have included in the bashrc file ,
export ANDROID_HOME=/home/ttnd/android-sdk-linux
export PATH=${PATH}:$ANDROID_HOME/tools:$ANDROID_HOME/platform-tools .
I have checked all the possible links available on web but still I am unable to find the issue.