Linux Mint something wrong with my .bashrc

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

vamsiampolu

Posted 2013-10-27T14:02:44.717

Reputation: 165

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 between PATH= $PATH, change that to PATH=$PATH. To check if an environment variable has been set, run echo $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.917

As 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

Answers

1

You haven't defined $ANDROID_SDK_HOME in the code you pasted. You only defined $ANDROID_HOME

edited to reflect terdon's comment.

thisguy123

Posted 2013-10-27T14:02:44.717

Reputation: 236

+1 for ANDROID_SDK_HOME but the error is because the OP ran $PATH not echo $PATH, it does not mean the directory does not exist. – terdon – 2013-10-27T16:00:28.970