I recently installed Android Studio on my Ubuntu 16.04 LTS. Now, I have two queries:
- Is it necessary to set up the PATH variable? If yes, what would be the right approach to do that. I researched different links on this forum like setting-environment-variables-for-android-studio and found that we need to edit
~/.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.
- I have tried different links, yet not able to figure out a working solution to setup PATH variables.
- I am able to run Android studio from Nautilus and even via terminal (the standard way).
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.
~/.bashrc
? it seems like you are trying to change/etc/bash.bashrc
and system says you about it./etc/bash.bashrc
file only. If its not the right one, where can I find the actualbashrc
file?