Tuesday, August 28, 2012

Adding Environmental Paths in Ubuntu Linux

I decided to work on some Android development project on Ubuntu. I had to switch because a library I was trying to use had to be built with the Android NDK. (Windows really took a dump on me when I tried to use Cygwin). Since this was my first install of Android and Java on my linux machine, I had to setup the PATHS in order for me to use them in terminal. Here is how to add them

#open your terminal and type
nano ~/.bashrc

#Add to the top of file: (remember you have to tell linux where the sdk directory is)
#for me, I had my SDK in the home/username directory represented by ~.
export PATH=${PATH}:~/android-sdk-linux/tools
export PATH=${PATH}:~/android-sdk-linux/platform-tools

#press ctrl + X, then Y to confirm and ENTER to exit
#More than likely, you will need to restart
#When you open terminal, you should be able to 
#type 'android' without quotations and it should bring up SDK manager