Where the Android-SDK is installed depends on how you installed it. If you downloaded the SDK through their website and then dragged/dropped the Application to your Applications folder, it's most likely in /Applications/ADT/sdk (as it is in your case).
If you installed it using Homebrew (brew install android-sdk), then it's located here:
/usr/yourusername/android-sdks
env | grep ANDROID_HOME on the terminal that is working. If the file is already existed This should give something like
ANDROID_HOME=/usr/yourusername/android-sdks
If not they do changes on Bash file
Type below command to check whether bash_profile existed or not
ls -1 ~/.bash_profile
If it is not existed then it message throws as “No such file or directory”
touch ~/.bash_profile
now open .bash_profile, if you dont have one just create one
vi ~/.bash_profile
Add the following:
esc + i it allow to enter data into vim editor
#set ANDROID_HOME
ANDROID_HOME=/usr/yourusername/android-sdks
export ANDROID_HOME
Once you have this set, you need to add this to the PATH environment variable
export PATH=$PATH:$ANDROID_HOME/tools:$ANDROID_HOME/platform-tools
Now save the file by pressing below commands esc + :wq
And after that to execute bash file
source ~/.bash_profile
Now if you type this command it should show path
echo $ANDROID_HOME
No comments:
Post a Comment