Set Android SDK paths in Ubuntu
Open the command line, then type
You should get a long list of commands associated with adb. If that has not happened you may not have adb installed and will most probably be offered a line of code in the command line, which you can run to install adb. Just in case, here is that code:
sudo apt-get install android-tools-adb
Next check if android is working by typing:
You may see a message “Command not found” . Now we need to set the path for tools and platform tools so that your computer can use various commands available in each respective folder.
Locate and open the ‘Android’ folder. From home in the command line I typed:
Next we need the path to this directory.
Ctrl + L will highlight the path to your present location in your computer. Copy this path.
Navigate back to your home folder and find a hidden folder called .bashrc .
Ctrl + H will make visible hidden files in your folder.
Open .bashrc and scroll to the bottom of the page. Then type:
export PATH=$PATH “~/Android/Sdk/platform-tools" export PATH=$PATH "~/Android/Sdk/tools"
Save and exit .bashrc and open your command line again. Type
again and you should now have the log of commands I mentioned earlier.
you will most likely receive a message like this:
If you prefer to use the Android Studio from the command line, navigate to ~/Android/Sdk/tools/bin , where you can find avdmanager for virtual device controls and sdkmanager for studio controls. NB. Type ./ before either command to execute each script.