Reputation: 1927
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?
Upvotes: 8
Views: 22844
Reputation: 11
Currently using Jetbrains rider I had a similar issue. What worked for me, I closed out Jetbrains and ran it as admin and it worked for me.
Upvotes: 0
Reputation: 1
It worked for me to uninstall everything, delete the directories created in Program Files and Program Files (x86) and reinstall in another directory.
Upvotes: 0
Reputation: 8161
When using the sdkmanager
command in Linux, you have to run it as root:
sudo sdkmanager --install emulator
Upvotes: 1
Reputation: 81
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.
Upvotes: 3
Reputation: 21
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.
Upvotes: 2
Reputation: 51
You cannot edit local.properties it is a generated file, right click your project and select 'Open Module Settings' under SDK Location put your location for your SDK.
paste in /Users/gururaj/Library/Android/sdk
Clean and rebuild your project
Update
Try to delete your local.properties file and create a new one, but do not check it into version control.
Right click top level of project and Create new file 'local.properties' then add: sdk.dir=/Users/gururaj/Library/Android/sdk
Clean and build
Upvotes: 0
Reputation: 1739
On Linux, It's a permission issue. You can resolve the problem quickly by launching Android Studio as root :
gksudo <path_to_file_studio.sh>
If you want to fix this problem on long term and in more secure and better way you should find the right files / folder to alter and change their permissions. I didn't point it for now.
This solution was tested on Debian, but I guess it works on Unbuntu, Mint ...etc.
Upvotes: 0
Reputation: 674
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.
Upvotes: 26
Reputation: 481
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.
Upvotes: 4