I have set following path in my bash_profile
file:
export ANDROID_HOME=/Users/viki-donor/Library/Android/sdk
export PATH=$ANDROID_HOME/build-tools/26.0.2:$PATH
export PATH=$ANDROID_HOME/platform-tools:$PATH
export PATH=$ANDROID_HOME/tools:$PATH
I saved it and ran the command source ~/.bash_profile
. If I type adb
the command is running successfully. But after sometime. If I run the same command adb
its not able to recognize the command and I get command not found
error. I again run source ~/.bash_profile
and it starts working fine. Why do I have to run source ~/.bash_profile
again and again ?
~/.bash_profile
is only run for login shells, you should add these settings to~/.bashrc
.bash_profile
andbashrc_profile
Same problem @ArkadiuszDrabczykecho $PATH
say when it is broken and what might set it to that value?~/.bashrc
NOT~/.bashrc_profile
see the FILES section in bash's man page