Android Studio - Update to 2.3 - Studio doesn't have write access
Asked Answered
I

12

25

I didn't have this problem before. When i am trying to update Android Studio to 2.3, i get this:

Studio does not have write access to /private/var/folders/00/n4yy8fsx0njck05bfll1t3_w0000gn/T/AppTranslocation/2D9E214E-60BE-41D9-9843-3536E011FD7E/d/Android Studio.app/Contents. Please run it by a privileged user to update.

The account that i am in is Admin account and i also tried to give full access to that directory.

chmod -R 777 /private/var/....

but nothing worked. Any help will be much appreciated.

Ibidem answered 6/3, 2017 at 10:36 Comment(0)
M
58

I experienced the same issue. Resolved it by running Android studio with sudo from the command line:

sudo /Applications/Android\ Studio.app/Contents/MacOS/studio

After the update has been downloaded you have to run the command one more time for Android studio to copy over the correct files.

Next time you run Android studio with your non-privileged user it should be updated.

Milt answered 7/3, 2017 at 20:43 Comment(4)
But this keeps happening each time you open/update Android studio.Nessa
This is answer is completely wrong. Never run a program like Android Studio as super user! Just give your user permission to write to that folder.Pressure
iguarna this was the correct answer in many scenarios. thanksFeatherston
This is the best answer. Worked perfectly.Indurate
S
37

This also happened to me, but it was because the app was not in the /Applications folder, after moving it to the right folder it ran without problems.

Shunt answered 3/6, 2017 at 4:18 Comment(2)
Perfect answer.Patrizio
Killed 2 birds with 1 stone :)Sogdian
L
25

Case Android Studio is already under the Application folder run the following command on the terminal.

sudo chmod -R 777 /Applications/Android\ Studio.app/Contents
Larch answered 28/9, 2018 at 15:28 Comment(0)
S
7

The studio needs write access for all files and folders in it. We use Recursive (-R) for it.

Try this in terminal:

sudo chown -R username:username /opt/android-studio

username is the name of your computer.

Screwworm answered 25/7, 2018 at 12:15 Comment(0)
N
6

Nothing to worry about. Here is when it hapens:

Reason When you have the Android Studio as a package in MAC OS, placed in Downloads OR anywhere on the Dashboard. Some such apps do not have appropriate permissions.

Running sudo command, will resolve this issue for once but will still be the same next time when you open/update studio.

Solution

  • Close all instances of Android Studio if running.

  • Open finder window and lok for 'Applications' label in the 'Favorites' section.

  • Simply drag and drop the Studio package over the 'Applications' (move to applications).

  • Your problem should now be resolved! Run it. Update it.

Nessa answered 19/8, 2017 at 4:36 Comment(0)
L
6

sudo chmod -R 777 [android studio folder]

Langan answered 27/3, 2018 at 13:48 Comment(1)
in my case.. My android-studio folder was in home. as I execute sudo chown shahzad -R android-studio and it done.Bolten
S
4

This also happens if you have installed your Android Studio with Homebrew Cask (by running brew cask install android-studio someday earlier).

To verify if your AS has been installed with Homebrew, run brew cask list and see if the list contains android-studio.

If it does, to upgrade Android Studio to latest version, just run

brew cask upgrade android-studio
Stelu answered 29/9, 2018 at 7:19 Comment(0)
T
3

If you downloaded it using Jetbrains toolbox try to update it using the toolbox. That fixed the issue for me.

Thriftless answered 15/4, 2020 at 17:29 Comment(0)
E
1

If you're using JetBrains Toolbox, you can update it through Toolbox instead of the IDE.

I think this is related to jgutix's answer:

This also happened to me, but it was because the app was not in the /Applications folder

Eighteen answered 10/2, 2021 at 15:53 Comment(0)
C
0

I have Macbook pro, I had a similar error when updating from version 3.6 rc-01 to version 3.6 rc-03. I moved the app from the downloads folder to the Applications folder.

Courlan answered 11/2, 2020 at 10:36 Comment(0)
M
0

I faced the same issue when I was updating Android Studio. I fixed it by locating where the Android Studio file was present, opened Finder, on the left side under Favourites tab click Applications Tab and dragged the file in to the Applications Folder. If you can't locate the file just Right Click from dock and "Show In Finder" and then drag in the Applications

Masturbate answered 15/4, 2020 at 14:39 Comment(0)
G
0

What worked for me is just: setting my user to own /Contents: In my case I was solving this problem for a different JetBrains Software Datagrip.

~ $ sudo chown $(whoami) /Applications/DataGrip.app/Contents

or for Android Studio specifically:

~ $ sudo chown $(whoami) /Applications/Android\ Studio.app/Contents

Then restarting the application. I think its really more accurate to say that I own it rather than I have the perms to read/write on it. Also, I preferred not to use the -R flag since I want the minimum amount of ownership.

Gertudegerty answered 29/3, 2021 at 14:45 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.