How to update Android Studio in Ubuntu?
I am trying to update from version 2.0.0 to version 2.1.2 in Ubuntu 64bit/14.04LTS but when I click "update and restart" it says "Downloading patches" and it closes.
It does not start again and if I try to open it, the version is still 2.0.0.
Is there any tutorial to manually update android studio? (keep all settings and etc).
27 Answers
The first time I installed Android Studio, I followed the instructions given at:
Basically
sudo add-apt-repository ppa:maarten-fonville/android-studio
sudo apt update
sudo apt install android-studioWith this you have a clean installation of android studio
Then, when I need to update it, I just rerun
sudo apt install android-studioIf you didn't use this method, it's worth a try. It is cleaner in the long run.
1I experienced the same issue when trying to update from 2.1.0 to 2.1.1 and the update problem still persisted after the Android Studio 2.1.2 release.
In the end the only option was a clean install of Android Studio.
To keep your existing Android Studio settings download and install the latest version into a different folder. When the new installation of Android Studio is run for the first time it will prompt you to import your settings from the older Android Studio version you have installed.
I had the same problem. I found that after the patch is downloaded Android Studio tries to update itself but as it is run without sudo rights it fallbacks to simply run the old version of Android Studio without updating it.
In order to update my old version of Android studio I went to the folder where Android studio was installed, in my case ~/apps/android-studio/bin/, and run with sudo Android Studio, in my case sudo ./studio.sh
It will then ask you for your Android Studio configuration file. Be careful about the location where the installation process will install a new Android SDK version, because in my case it wanted to install it in the wrong directory, I had to select custom installation in order to select the folder where I had my previous Android SDK.
I always download my Android Studio mannually from:
and Android SDK from:
During instalation I select exisitng unpacked SDK instead of downloading during installation - it causes problems with not well downloaded packages
Try next time this way.
Hope it will help
You most likely have permissions issues.
This is quick, not very good fix. sudo chmod -R 777 [android studio folder]. This will give all permissions to everyone for that folder, this might not be a big deal for your home private machine, but for work/public one obviously you don't want that.
Good fix would be setting the proper permissions to the folder and subfolders where your Android studio is installed.
1Execute the 'studio.sh' file by specifying the complete path. I ran it from my $HOME directory using command: /opt/android-studio/bin/studio.sh'
[Note: android-studio directory was given complete permissions previously. So, you may try 'sudo' in case appropriate permissions are not allotted]
To update Android Studio, the Android Studio was saying the it needed the writing access for the folder "android-studio where it's installed, by default is in `$HOME/android-studio/.
How you find the permissions?
- Look the tutorial in that has this video
- Open your terminal and write
cd <the directory where android-studio is located>(in may case,cd $HOME) to go to the directory. - Write on the terminal
ls -lto see the list of permissions.You can see the directory or
dhas enabled readr, writewand executexfor the userroot, group of user. But others has onlyr andx, notw. This means Android Studio program hasn't writing access for the folderandroid-studio`. - To enable writing access, you put on the terminal
sudo chmod o+w android-studio.
Now you can update Android Studio.