问题
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.
回答1:
I ran the Android studio as administrator and then it worked as it is a permission issue.
回答2:
chmod 777 $ANDROID_HOME -R
is not a good solution like @spark mentioned.
I solved it by setting ownership to myself
sudo chown $USER:$USER $ANDROID_HOME -R
回答3:
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.
回答4:
- Delete old version
- Reboot
- Install new version
hope this helps :)
回答5:
for macos:
sudo chmod -R 777 ~/Library/Android
回答6:
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.
回答7:
In windows, you may run Android Studio as Administrator
来源:https://stackoverflow.com/questions/43042032/android-studio-fails-to-install-update-error-failed-to-read-or-create-install