14

I am running Mint 14 (Linux) , and have run into a major issue with using Android Studio. When running the update feature, all of the packages come back as "ACCESS DENIED". how can I fix this? How can I grant the permission to download and install.

Additional information: the studio.sh is running out of my root directory under /usr/bin/android-studio/bin

Thank you for your help, my grade depends on this.

user2569708
  • 147
  • 1
  • 1
  • 6

7 Answers7

38

This is probably because you do not have sufficient permissions. Try changing the owner of your studio installation folder. Try the following command.

sudo chown -R $USER:$USER /usr/bin/android-studio

Chait
  • 1,052
  • 2
  • 18
  • 30
  • Worked for me, thanks! For Linux newbies like me, `cd` before installation path, then `sudo chown -R yourusername dirname` – tudor May 22 '19 at 10:33
  • 2
    Thanks for me this worked sudo chown -R $USER:$GROUP /usr/bin/android-studio on opensuse – Mokrane Feb 06 '21 at 05:48
  • This worked for me. I had to change my path to /opt/android-studio. Remember to change the path to the folder in which android studio is installed. ```sudo chown -R $USER:$USER ``` – Sosu Alfred May 05 '21 at 17:50
  • 3
    With my installation, it showed problems with `/opt/android-studio/`. I just ran this command: `sudo chown -R $USER:$USER /opt/android-studio/`. That fixed it. – n-anselm May 07 '21 at 14:11
5

if your using Ubuntu android 3.0v and getting error while updating to latest version and if you installed android studio using android installation guide example official video then you have to run sudo chown -R $USER:$USER /usr/local/android-studio/ this commend in your terminal

and make sure your android studio folder available in /local/ or any other folder and make necessary changes to /usr/etc path

2

go to android studio Click Help>>Check for update>> You will be told to run under root...a certain directory is given usr/local/etc/android-studio navigate to usr/local/etc/android-studio/bin ... Then run sudo sh studio.sh

--It will update as soon as you press enter...Hope it helps bro

Sorry I answered late though anyways it will help others

2

In latest version of Android Studio, Updates are handled by snap, so you can type 'snap refresh' command inside terminal of Android Studio to update Android Studio as well.

Jay Dangar
  • 3,271
  • 1
  • 16
  • 35
2

Had same issue when upgrading Android Studio from 3.4.x to 3.5.3 (with Flutter and Dart plugins).

Running Debian Buster.

My path is /opt/android-studio/.

I use terminal to run the studio.sh: /opt/android-studio/bin$ ./studio.sh

I have tried the suggested answers with no luck:

  • set the ownership of the folder ($ sudo chown -R name:group /opt/android-studio).
  • kill the java processes (ps -A | grep java), but it actually kills the Android Studio and the downloader.
  • run Android Studio as sudo, fails with some errors, which is good as it's not supposed to be run as sudo. Setting the ownership should be enough.

What I did:

  • Close all Android Studio windows / projects, leave only 1 window to update.
  • Help > 'Check for Updates' > select 'Update and restart'.
  • It shows download process, click 'Run in background'.
  • when it's done downloading, click at download process at the bottom which will prompt to implement the update.
  • click OK or Update now.
  • Android Studio will close automatically and process / unzip the update.
  • Done.

Or just download the latest Android Studio zip file and extract again.

Dipankar Baghel
  • 1,932
  • 2
  • 12
  • 24
2

It is very simple. I looked at all solution and non of it work but this really worked. Try opening android studio using terminal

1.Open terminal (ctrl + alt + t)

2.Type sudo su command then enters your password.

3.Type cd /opt/android-studio/bin.

4.Run Android studio using sh ./studio.sh.

and then click on update option or check for updates.

Pranav
  • 21
  • 1
-2

I guess its too late for you but the problem is you dont run android studio in root.

Go to /android-studio/bin in the console and run "sudo sh studio.sh" and you click to update the software.

Nutriz
  • 189
  • 2
  • 12