Ask Ubuntu Asked by Manu Mathur on August 2, 2020
I recently installed Android Studio on my Ubuntu 16.04 LTS. Now, I have two queries:
~/.bashrc
file found at /etc/
folder, but none helped.Here is the location of studio.sh
file on my system:
/home/tecjunkie/android-studio/bin
I also copied these two commands at the end of ~/.bashrc
file:
# Add the Android Studio /bin directory to PATH
export PATH=$PATH:~/android-studio/bin
Source link for above command – setting up Android development on Ubuntu (Check pointer #5)
However, I am still unsure if this is the right way to setup PATH variable on a permanently basis?
Also, whenever I tried saving the ~/.bashrc
file, I got an error saying:
Could not save the file "/etc/bash.bashrc". You do not have the
permission necessary to save the file. Please check that you typed the
location correctly and try again.
Now, how to setup PATH variable permanently to avoid typing ./studio.sh
command everytime?
P.S.
Also, if the experts here need any more detail, please let me know so that I can add it to my question.
EDIT:
Right now I tried creating a Blank activity on AS just to check if AS is opening or not on Linux OS and on the first instance, I faced Gradle sync issue.
Here is the screenshot listing the errors I am getting:
When I tried the same task on Windows OS, the sync operation completed in just 52seconds.
How to get rid of this gradle sync issue on Linux OS because until the sync gets successful, design editor will not be available for use on Linux.
Would request the experts here to assist on this issue as well.
Sorry for over-editing this answer, but I think I should include a better explanation.
You do not need to set up the PATH
if you do not want to, however you will have to type out the path of the executable every time.
~/.bashrc
should be in your home folder at /home/tecjunkie/.bashrc
(~ is a shortcut referring to your home folder). It is, however, hidden so it won't show up in files. You can show hidden files by pressing Ctrl + h
in Nautilus, or from terminal by typing ls -a
It appears you are trying to edit the /etc/bash.bashrc
file. This will bring identical results, but is unnecessary since the executable is in your home folder. (see What's the difference between /etc/bash.bashrc and ~/.bashrc? Which one should I use?) Editing that file requires root privileges.
In order for changes to the ~/.bashrc
to take effect, you need to run:
source ~/.bashrc
(Rebooting should work too)
This is the easiest way to add a location to PATH
.
Answered by Kalyon on August 2, 2020
Get help from others!
Recent Answers
Recent Questions
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP