@jamesemanon I solved this issue: 1) open android studio. 2) Go to Preferences -> Appearance & Behavior -> System settings -> Android SDK. 3) Click on the SDK tools tab. 4) Search for Android SDK command-line tools and install them.
Install the SDKClick Tools > SDK Manager. In the SDK Platforms tab, select Android 12. In the SDK Tools tab, select Android SDK Build-Tools 31. Click OK to install the SDK.
Try running Android Studio as an administrator, by right-clicking on the .exe and selecting "Run As Administrator".
Also, some anti-virus programs have been known to interfere with SDK Manager.
I was getting a similar permission issue and SDK Manager could not download and install new components. Error message was (I'm running Android Studio (I/O Preview) 0.2.9)
"Unable to create C:\Program Files (x86)\Android\android-studio\sdk\temp"
Although solution was infact what @william-tate's answer says, I could not run the 'SDK Manager' directly. It fails with message:
Failed to execute tools\android.bat The system cannot find the file specified.
Instead I ran the 'tools\android.bat' as Administrator, which in turn launched SDK Manager with same permissions which fixed the issue.
Hope this helps for someone who faces the issue I faced.
In Mac OS X (tried with Android Studio), do the following in Terminal
cd /android/adt-bundle-mac-x86_64/sdk/tools
sudo ./android sdk
This launches SDK manager as admin. Now update/install the packages from SDK manager and it'll work.
For Android Studio, selecting "Run As Administrator" while starting Android Studio helps.
In my case I had to specify proxy settings in Tools->Options.
I had same problem when I try to install it on my pc (Win7, 64-bit system). I had an error message shown in figure below. But when I check my local folder 'C:\Users\username\AppData\Local\Android\sdk', the Android SDK is already there. Somehow Android studio could not see/link it.
So please check first whether you can find the Android SDK in the local folder. If yes, just follow the next steps.
Hopefully it helps.
I had a similar issue - very slow xml downloads followed by an empty package list. The SDK, it seems, was trying to use legacy Java installation. Setting the JAVA_HOME to the 1.6 jdk did the trick.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With