hi i am using ubuntu 12.04. and in ~/.bashrc file I set following things
export ANDROID_HOME=/home/nilkash/Downloads/android-sdk-linux/platform-tools
But still it gives me android: command not found error. how to set path for android. Need Help. Thank you.
To include the SDK's tools and platform-tools directories in your PATH environment open text editor to create or modify the ~/.bash_profile file, adding below line:
export PATH=${PATH}:/home/nilkash/Downloads/android-sdk-linux/platform-tools:/home/nilkash/Downloads/android-sdk-linux/tools
For Ubuntu:
To modify the PATH variable of your system, you need to edit your .bashrc file. To do so, in a terminal, execute the following command:
$ nano ~/.bashrc
You will now have the Nano text editor enabled on the terminal. Now, at the very top of the file, enter the following:
#AndroidDev PATH
export PATH=${PATH}:~/android-sdk-linux/tools
export PATH=${PATH}:~/android-sdk-linux/platform-tools
Once you're finished, press CTRL + X, Y, and then hit Enter to save your changes and exit the Nano text editor.
To reload the ~/.bashrc
without re log in:
. ~/.bashrc or source ~/.bashrc
References:
- help.ubuntu.com/community/AndroidSDK
- How do I reload .bashrc without logging out and back in?
1) Check in System Settings -> Details, whether your Ubuntu is 32-bit or 64-bit
2) If your Ubuntu is a 32-bit OS then run this sudo apt-get install libgl1-mesa-dev
In case of 64-bit OS run this sudo apt-get install ia32-libs
3) run this sudo apt-get install openjdk-6-jdk
or better this sudo apt-get install openjdk-7-jdk
4) Download SDK platform tools from here http://developer.android.com/sdk/index.html
5) Unzip downloaded file "adt-bundle-linux-x86_64-20131030.zip" (you can have a little bit different name ;). But you should get folder contained two sub folder - sdk and eclipse
6) Run this nautilus ~
7) In opened window create folder 'android-sdk-linux'
8) copy the all entire contents of folder sdk (from unzipped archive) to this new folder 'android-sdk-linux'
9) try run this cd ~/android-sdk-linux/tools
then this ./android
. If you did all right you should see Android SDK Manager
10) run this sudo gedit ~/.bashrc
in opened editor add this in very top
#AndroidDev PATH
export PATH=${PATH}:~/android-sdk-linux/tools
export PATH=${PATH}:~/android-sdk-linux/platform-tools
11) save and close
12) run exec bash
then try run android
13) give write permissions to android-sdk-linux folder
Enjoy! ;)
android: command not found error
Solution for Linux and Mac:
1) Export your Android Sdk path to the ANDROID_HOME variable
$ export ANDROID_HOME=~/Android/Sdk (where ~/Android/Sdk is a full path to your Sdk folder)
(change "~" to "$HOME" on Mac)
2) Export Sdk tools to the PATH variable
$ export PATH=$ANDROID_HOME/tools:$PATH
That's it!
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