I am new in developing native app using Salesforce SDK. I tried to create android project from command line using forcedroid tool but there is problem in setting environment variable named ANDROID_HOME.
But i don't know how to set this variable.
I am attaching screenshot to describe my problem correctly.
Open Terminal, then choose Terminal > Preferences. From the General pane, select ”Command (complete path).” In the field provided, enter one of the shell paths listed in /etc/shells, such as /bin/zsh, /bin/bash, /bin/csh, /bin/dash, /bin/ksh, /bin/sh, or /bin/tcsh.
Variable name: ANDROID_HOME , Variable value: the path where you installed the android SDK, in my case is, C:\Android\android-sdk . You have to add the variable to the Path variable system by adding this: ;%ANDROID_HOME%\platform-tools;%ANDROID_HOME%\tools; .
To make it permanent on your system and the variable keep working after close the terminal, ou after a restart use:
nano ~/.bash_profile
Add lines:
export ANDROID_HOME=/YOUR_PATH_TO/android-sdk export PATH=$PATH:$ANDROID_HOME/platform-tools export PATH=$PATH:$ANDROID_HOME/tools export PATH=$PATH:$ANDROID_HOME/tools/bin export PATH=$PATH:$ANDROID_HOME/emulator
Reopen terminal and check if it worked:
source ~/.bash_profile echo $ANDROID_HOME
Open the terminal and type :
export ANDROID_HOME=/Applications/ADT/sdk
Add this to the PATH environment variable
export PATH=$PATH:$ANDROID_HOME/platform-tools
If the terminal doesn't locate the added path(s) from the .zshrc, please run this command
source ~/.zshrc
Hope it works to you!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With