I placed Android SDK inside /opt/android-sdk and also updated .bashrc file with the lines :
export ANDROID_HOME="/opt/android-sdk" export PATH=$ANDROID_HOME/tools:$ANDROID_HOME/platform-tools:$PATH
then I reloaded the .bashrc file:
source ~/.bashrc
After that I checked the ANDROID_HOME by hitting the command as:
echo $ANDROID_HOME
which resulted as:
/opt/android-sdk
which is the correct location where I placed it. After that I created a NativeScript Mobile Application project :
tns create MobileApp --ng
then I entered inside the MobileApp directory and tried to add platform as Android:
tns platform add android
but I got this error which stated as follow :
The ANDROID_HOME environment variable is not set or it points to a non-existent directory. You will not be able to perform any build-related operations for Android.
Did I miss anything in the above process of adding Android as platform in NativeScript Mobile Application project?
ANDROID_HOME
environment variable. Perhapstns
works with some previously-forked daemon process. – Daphne