Android Studio 3.0 Preview - Studio does not have write access

Viewed 24410

I'm using Android Studio 3.0 Canary 1. I'm trying to update it to Android Studio 3.0 Canary 2 but it shows the following error:

Studio does not have write access to /private/var/folders/mk/h5qpw_r11_7ggh9q52n9hhlr0000gn/T/AppTranslocation/1321881E-C41D-4AF7-B207-F31894226D50/d/Android Studio 3.0 Preview.app/Contents. Please run it by a privileged user to update.

I even tried running Android studio with sudo from the command line:

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

But it didn't work. Any help will be much appreciated.

19 Answers

It seems you can also run into this issue if you have Android Studio installed via JetBrains Toolbox. The solution then is to just quit Android Studio, and install the update via the ToolBox.

The easiest solution ever: I moved the Android Studio 3.5 Canary file from the Downloads folder to Applications folder.

note: make sure Android Studio not running.

  1. Go to applications->Android Studio
  2. Right click and select "Show Package Content"
  3. Right click on Contents folder and select "Get info"
  4. Look for "Sharing & Permission" option.
  5. Give read & write permission to your user.
  6. From gear icon select "Allow for enclosed item"

Simply move to Application folder. From----> /private/var/folders/............./d/ TO ----->. /Application or write access folder....

The same error showed in my Android studio as well, when I tried to update. So I copied my existing Android Studio.app file from a private folder to the Application folder. This fixed my issue.

In my case on Mac, Android Studio wasn't opened from the Applications folder for some reason. Make sure you open the one that's there and not a copy that's saved elsewhere, otherwise it won't have the privileges.

Possible solution in case Android Studio application is in the download folder:

Ran into a similar issue on Big Sur:

  • I moved it to the application folder
  • reopened Android Studio
  • retried update

Solved in my case.

Your app can be out of applications folder. Did you check it. First check then if it is not in app folder move to app folder and try again.

If it doesn't work you must try terminal commands that the other answers.

In Mac goes to android studio location:

  1. Right click on android icon and select reveal in Finder

  2. Than In Finder, select Android Studio File and right click and select -> Show package contents

  3. Then, Select contents folder and right click and select get info then Go to sharing and permissions and select read and write than exit
  4. Open Android Studio and check for updates, its done.

Using the terminal and going to Android Studio binary and executing from terminal, such as

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

Solved the problem for me.

It appears that launching a binary directly from terminal does not launch App Translocation protection. More information here

In my case the Android Studio is installed with brew. When using upgrade from UI it shows me the error described above. To upgrade the version I use:

brew upgrade android-studio

Then it works without issues.

This happened to me when I was running an Android Studio Preview build from within the downloads folder. I forgot to move it to the Applications folder — upon doing so, everything worked as expected!

Related