0
The path of my .basrc file is
/home/vamsi/.bashrc
It is weird that my file has nothing but the path I set. I think I am using a file at the wrong location or that I have lost my .bashrc
file as none of the environment variables set here seem to work.
#ANDROID_DEV
ANDROID_HOME=/opt/android-sdk-linux
export ANDROID_HOME
PATH= $PATH:$ANDROID_SDK_HOME/tools
export PATH
PATH=$PATH:$ANDROID_HOME/platform-tools
export PATH
PATH=$PATH:$ANDROID_HOME/build-tools
export PATH
#MAVEN-PATH
M2_HOME=/opt/apache-maven-3.1.0
export M2_HOME
M2=$PATH:$M2_HOME/bin
export M2
I was prompted to install maven2 in order to use mvn, but the android command cannot be found. Could you please help me find a solution to this issue.
EDIT:
Meanwhile,I tried this:
export PATH=${PATH}:/opt/android-sdk-linux/platform-tools
export PATH=${PATH}:/opt/android-sdk-linux/tools
Now,the output of $PATH echoes:
bash: /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/opt/android-sdk-linux/platform-tools:/opt/android-sdk-linux/build-tools: No such file or directory
NOW WORKING:
1. Used ANDROID_HOME
instead of ANDROID_SDK_HOME
2. Removed space between = $PATH
3. Ran echo $PATH
4. Logged out and logged back in
5. Opened the terminal and tried android list targets
What are you trying to do? If "vamsi"is your username, .bashrc is in right place. – khajvah – 2013-10-27T14:18:30.833
what does echo $PATH give you? – jbat100 – 2013-10-27T14:19:26.873
What has android do with your computer? Explain your problem – khajvah – 2013-10-27T14:19:29.667
I would like to add the Android sdk path to my environment variables in linux as I would like to try developing apps with ant and the sdk using a text editor of my choice. – vamsiampolu – 2013-10-27T14:52:40.180
2Your
.bashrc
is almost fine, there is one error, there should be no space betweenPATH= $PATH
, change that toPATH=$PATH
. To check if an environment variable has been set, runecho $PATH
, not$PATH
by itself. Now, what exactly do you want to add to your path and what makes you think it is not working? – terdon – 2013-10-27T15:32:49.917As a side note,
PATH
is usually set at login time for example in.bash_profile
, not.bashrc
. – Cristian Ciupitu – 2013-10-27T16:03:27.647