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.

Vamsi Challa
  • 11,038
  • 31
  • 99
  • 149

12 Answers12

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.

luckytommy
  • 630
  • 6
  • 4
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.

jgutix
  • 661
  • 1
  • 6
  • 8
24

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
Andrei Calazans
  • 453
  • 7
  • 16
Prashant Gaykar
  • 259
  • 2
  • 5
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.

Shachi
  • 1,858
  • 3
  • 23
  • 41
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.

sud007
  • 5,824
  • 4
  • 56
  • 63
5

sudo chmod -R 777 [android studio folder]

Kai Wang
  • 3,303
  • 1
  • 31
  • 27
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
Stanisław Chmiela
  • 471
  • 1
  • 7
  • 30
3

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

Faaatman
  • 477
  • 2
  • 10
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

Victoria Gonda
  • 256
  • 2
  • 4
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.

Ogulcan Ucarsu
  • 236
  • 2
  • 5
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

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.

Zargold
  • 1,892
  • 18
  • 24