Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android Studio: Failed to update SDK or SDK Tools

Tags:

android

Android Studio (v2.2 Preview 3) suddenly failed to update the tools. It keeps giving the error pasted below:

To install: - LLDB 2.2 (lldb;2.2) Preparing "Install LLDB 2.2". Failed to read or create install properties file. Failed packages: - LLDB 2.2 (lldb;2.2)

I gave the folder full permissions. Ran android studio on administrator mode. End-tasked adb from task manager. Disabled antivirus. Deleted the folder and then ran the update again. But nothing works.

I also tried to create a new sdk location on my drive. But then that failed to, it gave the same error as above. -> Failed to read or create install properties file.

Any ideas?

like image 357
Kamil Kamili Avatar asked Jun 21 '16 18:06

Kamil Kamili


5 Answers

I also encountered the same error when trying to update build tools after upgrading Android Studio. Unfortunately, in my case, removing .AndroidStudio2.x folder and re-opened studio with no config imported didn't work.

But then inspired by this answer, I go to Android Studio folder, then to bin folder, right-clicked on studio64.exe, choose Run as administrator. Then when I tried to update the build tools, it worked.

I'll just leave it here as an alternative way in case someone encountered the same problem.

like image 117
Konayuki Avatar answered Oct 20 '22 13:10

Konayuki


For some reasons, this happens when you import the settings when upgrading Android Studio.

The fix is to delete the .AndroidStudio2.1 or .AndroidStudio2.2 folder in your profile directory. Open android studio and don't import any config.

This will however will ask to download the supporting libraries again.

like image 31
onerobertreyes Avatar answered Oct 20 '22 14:10

onerobertreyes


In Windows 10, I pinned the application to my taskbar, and right-clicked on the icon and chose the option to run as administrator. Then I went through the steps to download my SDKs. Everything worked as it should.

like image 27
atariman5000 Avatar answered Oct 20 '22 14:10

atariman5000


Using Windows7: I unzipped the SDK under C:\Program Files\... but eventually discovered that security permissions in the "Program Files" area prevented sdkmanager.bat from creating folders and files.

It looks like you can give sdkmanager.bat permissions, but there are many complications, especially in cmd.

So I moved the SDK to C:\Users\[admin_name]\.android (or any folder) where it's easy for the sdkmanger to create folders and files and it finally worked !!

Hope this helps someone. Thank-you to all those who have helped me.

like image 2
jtiller Avatar answered Oct 20 '22 14:10

jtiller


When using the sdkmanager command in Linux, you have to run it as root:

sudo sdkmanager --install emulator
like image 1
e18r Avatar answered Oct 20 '22 12:10

e18r