Android Studio fails to install update (error : Failed to read or create install properties file.)
AndroidAndroid StudioUbuntuAndroid Studio-2.3Android Update-SdkAndroid Problem Overview
Screenshot of error
I am running [ Android Studio 2.3 Build #AI-162.3764568, built on February 24, 2017 JRE: 1.8.0_112-release-b06 amd64 JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o] on Ubuntu 16.04. From last few days android studio gives me error on trying to update. I have no idea how to fix this.
Android Solutions
Solution 1 - Android
I ran the Android studio as administrator and then it worked as it is a permission issue.
Solution 2 - Android
chmod 777 $ANDROID_HOME -R
This is not a good solution like @spark mentioned.
I solved it by setting ownership to myself
sudo chown $USER:$USER $ANDROID_HOME -R
Solution 3 - Android
Problem Solved!
The permission of my Android directory was set to write only by root so android-studio was unable to write any changes. I changed the permissions to 777 and it fixed the problem.
Thanks for Help anyways.
Solution 4 - Android
Solution 1:
Use: sudo chown $USER: $ANDROID_HOME -R
My solution is setting folder permissions (and sub-folders using -R).
Root cause:
The permission of my Android SDK directory was set to write only by root so android-studio was unable to write any changes.
Detailed Process:
Take $ANDROID_HOME/platform-tools for example:
sudo chown $USER: $ANDROID_HOME/platform-tools
Before executing the command line:
bin ls -la $ANDROID_HOME/
total 56
drwxr-xr-x@ 26 gongzelong staff 832 Nov 3 01:51 .
drwx------@ 104 gongzelong staff 3328 Nov 6 17:55 ..
-rw-r--r--@ 1 gongzelong staff 18436 Oct 26 21:17 .DS_Store
drwxr-xr-x 2 gongzelong staff 64 Nov 4 01:47 .downloadIntermediates
-rw-r--r-- 1 gongzelong staff 16 Nov 6 17:46 .knownPackages
drwxr-xr-x 41 gongzelong staff 1312 Nov 4 23:08 .temp
-rw-r--r--@ 1 gongzelong staff 1158 Aug 30 2018 SDK Readme.txt
drwxr-xr-x@ 2 gongzelong staff 64 Aug 29 2016 add-ons
drwxr-xr-x@ 34 gongzelong staff 1088 Nov 3 01:47 build-tools
drwxr-xr-x@ 6 gongzelong staff 192 Apr 24 2019 cmake
drwxr-xr-x@ 51 gongzelong staff 1632 Oct 24 2016 docs
drwxr-xr-x 17 root wheel 544 Nov 12 2019 emulator
drwxr-xr-x@ 8 gongzelong staff 256 Jul 31 2018 extras
drwxr-xr-x@ 3 gongzelong staff 96 Nov 7 2017 fonts
drwxr-xr-x@ 9 gongzelong staff 288 Apr 21 2020 licenses
drwxr-xr-x@ 6 gongzelong staff 192 Apr 24 2019 lldb
drwxr-xr-x 7 gongzelong staff 224 Nov 4 22:47 ndk
drwxr-xr-x@ 20 gongzelong staff 640 Sep 29 2018 ndk-bundle
drwxr-xr-x@ 5 gongzelong staff 160 Dec 15 2016 patcher
**drwxr-xr-x 19 root wheel 608 Nov 12 2019 platform-tools**
drwxr-xr-x@ 16 gongzelong staff 512 Nov 3 01:47 platforms
drwxr-xr-x@ 33 gongzelong staff 1056 Feb 17 2020 skins
drwxr-xr-x@ 14 gongzelong staff 448 Nov 3 01:51 sources
drwxr-xr-x@ 13 gongzelong staff 416 Apr 8 2019 system-images
drwxr-xr-x@ 2 gongzelong staff 64 Feb 4 2018 temp
drwxr-xr-x 15 gongzelong staff 480 Oct 26 21:18 tools
After executing the command line:
➜ bin ls -la $ANDROID_HOME/
total 56
drwxr-xr-x@ 26 gongzelong staff 832 Nov 3 01:51 .
drwx------@ 104 gongzelong staff 3328 Nov 6 17:55 ..
-rw-r--r--@ 1 gongzelong staff 18436 Oct 26 21:17 .DS_Store
drwxr-xr-x 2 gongzelong staff 64 Nov 4 01:47 .downloadIntermediates
-rw-r--r-- 1 gongzelong staff 16 Nov 6 17:46 .knownPackages
drwxr-xr-x 41 gongzelong staff 1312 Nov 4 23:08 .temp
-rw-r--r--@ 1 gongzelong staff 1158 Aug 30 2018 SDK Readme.txt
drwxr-xr-x@ 2 gongzelong staff 64 Aug 29 2016 add-ons
drwxr-xr-x@ 34 gongzelong staff 1088 Nov 3 01:47 build-tools
drwxr-xr-x@ 6 gongzelong staff 192 Apr 24 2019 cmake
drwxr-xr-x@ 51 gongzelong staff 1632 Oct 24 2016 docs
drwxr-xr-x 17 root wheel 544 Nov 12 2019 emulator
drwxr-xr-x@ 8 gongzelong staff 256 Jul 31 2018 extras
drwxr-xr-x@ 3 gongzelong staff 96 Nov 7 2017 fonts
drwxr-xr-x@ 9 gongzelong staff 288 Apr 21 2020 licenses
drwxr-xr-x@ 6 gongzelong staff 192 Apr 24 2019 lldb
drwxr-xr-x 7 gongzelong staff 224 Nov 4 22:47 ndk
drwxr-xr-x@ 20 gongzelong staff 640 Sep 29 2018 ndk-bundle
drwxr-xr-x@ 5 gongzelong staff 160 Dec 15 2016 patcher
**drwxr-xr-x 19 gongzelong wheel 608 Nov 12 2019 platform-tools**
drwxr-xr-x@ 16 gongzelong staff 512 Nov 3 01:47 platforms
drwxr-xr-x@ 33 gongzelong staff 1056 Feb 17 2020 skins
drwxr-xr-x@ 14 gongzelong staff 448 Nov 3 01:51 sources
drwxr-xr-x@ 13 gongzelong staff 416 Apr 8 2019 system-images
drwxr-xr-x@ 2 gongzelong staff 64 Feb 4 2018 temp
drwxr-xr-x 15 gongzelong staff 480 Oct 26 21:18 tools
Then we do the update in SDK management:
before and after install sdk result screenshot
Solution 2:
Run Android Studio as administration.
sudo /Applications/Android\ Studio\ 4.1.0.app/Contents/MacOS/studio
It could also install the android sdk update successfully
Solution 5 - Android
for macos:
sudo chmod -R 777 ~/Library/Android
Solution 6 - Android
- Delete old version
- Reboot
- Install new version
hope this helps :)
Solution 7 - Android
If you are on a *nix system, you should locate $ANDROID_HOME
. Mine is installed inside /opt
. Given that this directory belongs to root
, you will need to invoke sudo
before running your command.
Solution 8 - Android
I had the same issues on windows and the problem for me was where the SDK was related.
When you go to File
- Project Structure
- Android SDK Location
you can see what SDK directory is defined.
The default SDK location was C:\Program Files (x86)\Android\android-sdk
and it seems you need to be an Administrator to be able to download packages.
I changed it to my user directory so I don't need admin privileges and I was able to download the required packages without any problems.
Also make sure you accpeted all licences before.
Solution 9 - Android
I ran in to this issue and when I navigated to the existing install of the SDK I found that it was symlinked to a previous version that I installed using Homebrew (which is no longer supported).
The fix was to remove this symlink, then Android Studio was able to install the updated SDK as expected.
Solution 10 - Android
I was facing the same problem, I solved it by first enabling the "Force https://... sources to be fetched using http://..." setting in the SDK Manager Tools > Options menu. and then I opened Android Studio as administrator.
Solution 11 - Android
In windows, you may run Android Studio as Administrator