Why can't I install android SDK? [duplicate] - android

Not sure what I'm doing wrong here. I installed the Android SDK Manager, and am now trying to install a platform like the Android Dev website suggests. Once I clicked install I got an error stating that the Manager could not create a temp folder within the Android directory. So I created it. Now I'm getting this error:
Downloading SDK Platform Android 2.3,
API 9, revision 1 File not found:
C:\Program Files
(x86)\Android\android-sdk-windows\temp\android-2.3_r01-linux.zip
(Access is denied)
There is also a little message under the progress bar that says "Done. Nothing was installed."
I'm running Windows 7 Ultimate, in case that's of any use.

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.
Chose 'Cancel' and click on 'X' on the top right corner.
Chose 'Do not re-run the setup wizard' and click 'OK'
Start Android Studio again and go 'Configure'-->'Project Defaults' --> 'Project Structure'
Add 'C:\Users\username\AppData\Local\Android\sdk' to 'Android Location' and click 'OK'
Click on 'Start a new Android Studio project'.
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.

In my case I was using Windows 7 with the 64-bit OS. We installed the 64-bit Java SE and 64-bit ADT Bundle. With that set up, we couldn't get the SDK manager to work correctly (specifically, no downloads allowed and it didn't show all the API download options). After trying all of the above answers and from other posts, we decided to look into the Java set up and realized it might the 64-bit configuration that's giving the ADT bundle grief (I vaguely recall seeing/reading this issue before).
So we uninstalled Java 64-bit and reinstalled the 32-bit, and then used the 32-bit ADT bundle, and it worked correctly. The system user was already an admin, so we didn't need to "Run as Administrator"

For those running SDK Manager in Eclipse, selecting "Run As Administrator" while starting Eclipse.exe helps.

For Linux/ubuntu User
Why it's happening?
due to lock icon on some folder(not having read/write access) in
"/yourpath/android-studio-SDK"
Sort and sweet solution
-Open Terminal (Ctrl +alt +t)
-copy pest sudo chown -R $USER: $HOME
-wait for a while.....
-now Try again to update your SDK
Happy Coding :)

The Access denied is because Windows doesn't give the default write and modify permission to the files in its install drive viz. c:
To resolve this issue I usually use a separate drive or in your case, you need to set the access rights to the specific folder in the options
right click -> options > security -> edit

In windows 8:
right click on windows button
List item
CDM as administrator
Press 'yes'
paste this $ C:\xxx\xxx\AppData\Local\Android\sdk\tools\android.bat

If you use SDK Manager in Eclipse:
Option 1: Right-click on eclipse.exe and select "Run As Administrator".
Option 2: If you don't want to start Eclipse.exe as Administrator just install/copy Eclipse installation files from "C:\program files\Eclipse ADT Bundle\" to some unprotected folder, like "D:\android\". Run "D:\android\eclipse\eclipse.exe", select menu item "Window => Preferences => Android" and change "SDK Location" to "D:\android\sdk\". After that you'll be able to install new packages in Android SDK Manager.

go to sdk folder and right click on SDK manager and run with administrator and enjoy installing.

To go along with what v01d said:
Using Android Studio for Mac OS X, the SDK folder could also be at /Users/{user}/Library/Android/sdk, where {user} is your username.
To find out where the partial SDK installation is, go to Configure > SDK Manager in Android Studio, then click edit at the top. This should pop up a window and show the location.
Copy this path and paste it front of the cd command in a terminal. Finally execute sudo ./android sdk to launch the standalone SDK manager.
EDIT (July 14, 2016):
The "android" binary file could also be at /Users/{user}/Library/Android/sdk/tools.

Solution for macOS
click right on AndroidStudio.app -> show Package Contents -> MacOS
now drag & dropping the studio-executable in a terminal
sudo! (Ctrl+A places your cursor in front)
start the SDK Manager inside AS to get your stuff (you will have root access)
https://www.youtube.com/watch?v=ZPnu3Nrd1u0&feature=youtu.be

you need 3 steps:
1- Configure -> "Appearance and Behavior" -> System Settings -> HTTP Proxy. I selected
"Automatic proxy configuration url:"
2-Delete your ~/.Android* folders (c:\users\ur user).
3-Run Android Studio. It will show you a welcome wizard where it tries to download the SDK again.

Related

android studio unable to connect to adb.Check the Event log for possible issues verify that your localhost entry is pointing to 127.0.0.1 [duplicate]

unable to connect to adb.check the event log for a possible issue, verify that localhost entry is pointing to 127.0.0.1 or:: 1 for ipv4 or ipv6
Tried adb kill-server, restart, invalidate restart nothing works.
Same issue reported over here https://issuetracker.google.com/issues/130791561
Note: I have not added any file or anything in studio, it's fresh installed Studio after format a full system still issue is there.
Replace your platform-tools with this one and delete the other one.
https://dl.google.com/android/repository/platform-tools_r26.0.0-windows.zip
I was also facing this issue in android Studio 3.4 version, but now I have fixed it , if you are using windows then follow these steps:
Download Platform tools from here
https://dl.google.com/android/repository/platform-tools_r26.0.0-windows.zip
Extract downloaded zip file
Go To location "C:\Users\your_computer_user_name\AppData\Local\Android\Sdk" and Delete "Platform tools" folder
Copy and Paste, downloaded platform tool folder to above location
Now Go to your android studio and Rebuild your project Then run.
For Mac Users, follow these simple steps :
Just simply Navigate to Tools > SDK Manager> Android SDK>, then click on the Tab of SDK Tools, then look for Android SDK Platform-tools and update it.
Then the last step, Invalidate cache and restart your IDE, after that, then finally you restart your Mac. (Sometimes it's this step is unnecessary)
It will work out successfully.
Solution for Linux Users.
System info: Linux Mint Cinnamon 19.1 , Android Studio 3.4.1
Issue description: Problem with platform tools.
Solution: Remove the folder manually and update SDK tools through Android Studio.
Step 1: Go to your Android SDK installation folder. By default under your home directory. Choose platform-tools and simply delete. (/home//Android/SDK)
Step 2: Open Android Studio and go to SDK Tools. (File -> Settings -> Appearance & Behaviour -> System Settings -> Android SDK -> SDK Tools) By the moment you should be able to see Android SDK Platform Tools line unchecked.
Step 3: Put a check to install Platform Tools and press OK. Notice it'll relocate the folder to the directory where deleted.
Now that you re-installed the platform tools, restart the Android Studio and your deployment targets should show up.
If you don't install the platform tool back and ever try to build or run a project you'll get this IDE error. Just FYI :)
So that's all. Enjoy.
Happy coding
If you use Windows, you might have a corruption in api-ms-win-crt-runtime-l1-1-0.dll.
Try to update it - you can get the update from Microsoft's website.
You should check it - path/to/sdk/platform-tools and try to run adb.exe
When you update Sdk platform tools(which contains adb.exe) to release 28.0.2 and if you are using windows 8.1 then it needs few updates from windows.
As per SDK Platform tools release notes(https://developer.android.com/studio/releases/platform-tools):
Updated Windows requirements : The platform tools now depend on the Windows Universal C Runtime, which is usually installed by default via Windows Update. If you see errors mentioning missing DLLs, you may need to manually fetch and install the runtime package."
Windows update url: https://support.microsoft.com/en-ca/help/2999226/update-for-universal-c-runtime-in-windows
Prerequisite for Windows update url: https://www.microsoft.com/en-us/download/details.aspx?id=42327
Faced the exact same issue but after updating with prerequisite url first then the other url provided now it is working perfectly fine for me.
It worked for me by selecting -> Use libusb backend
This worked for me on Windows:
Goto cmd write %temp% hit enter -> delete all data from there.
Restart your Computer.
Open Android Studio now, it will work.
Clear all cache memory (related to Android Studio)
Restart ADB manually from Android Studio (first option)
Open Command prompt and got android sdk>platform-tools> adb kill-server
press enter
and again adb start-server
press enter
Restart ADB manually form Android Stidio (second option)
go to your (SDK store path) sdk>platform-tools>adb
press enter
ex. D drive > sdk>platform-tools>adb
Restart your system
Delete the platform-tools folder from the sdk and replacing with the same from your another pc. I am also facing this problem after updating to 3.4. If you face same problem please update to Android Studio 3.5 Canary Channel.
The reason is for ADB server problem. Simply re-run your adb.
(Go to your SDK folder then inside platform-tools folder you can see adb.exe. copy the path location and paste it in your computers system Environment variable. Set a new path there and paste the adb.exe file location there. hope it will solve )
If you are using Genymotion, there is an update that fix the problem.
Genymotion 3.0.2 (April 18th, 2019)
Corrections
We have fixed an
incompatibility with the adb tool bundled in the platform-tools 28.0.2
package of the Android SDK, which caused failures to start virtual
devices.
This new version of adb changed the behavior of the “adb connect
:” command by making the “port” part mandatory. This
broke Genymotion Desktop in a few places where it did not pass the
port. We have adjusted the way we call “adb connect” and also updated
the version we ship with the product to match the one in
platform-tools 28.0.2.
If non of the above answers worked for you (as same happend to me), down grade to the old version of Android Studio by following these steps:
Uninstall current Android Studio
Go to Android Studio Archive and download any older version
After installation, Open the project. You might see an error like this
This version of Android Studio cannot open this project, please retry with Android Studio 3.4 or newer.
Now, open project gradle and update classpath tools.build version. I.e. in my case Android studio version is 3.2 and classpath 3.2.1
Hope it might save someone time.
I faced this issue last night, and I tried these methods to fix:
download older platform-tools and place it in the android sdk folder.(not work for me)
adb kill-server, adb start-server.(not work for me, adb had no response with these cmd)
kill the process that occupies port 5037.(for me, there is no other .exe run at this port)
reinstall platform-tools in Android Studio.(not work)
download ADB Kits and replace them in platform-tools folder.(work!!!)
It seems that my adb file has been modified or replaced by some programs. You can try these methods, and I hope some of them can work for you.
I had this issue only after a Genymotion update, on Mac.
What worked for me: Open Genymotion preferences, Select ADB, choose "Use custom Android SDK tools" and points to your Android SDK folder.
Actually the problem is not with the android studio version 3.4
Problem is with the android platform tools version which is latest one 29.
So install the previous version of the android platform tools version it will solve your problem. as above #Ved mentioned.
Ved link:
https://dl.google.com/android/repository/platform-tools_r26.0.0-windows.zip
EndTask adb.exe from Background processes (TaskManager) and Run Application again.
It works for me

Error Android SDK

I have installed Android SDK and it is working OK, except: for additional items,
e.g. Google USB driver
I get the error:
File not found: C:\Program Files (x86)\Android\android-sdk\temp\usb_driver_r07-windows.zip (Access is denied).
The folder ...temp is there but empty.
What is happening?
Do not use SDK Manager via Eclipse. You can find it from the Start menu and right click on it and choose "Run As Administrator".
This issue will be resolved by running your IDE (Eclipse, Android Studio) as "Run as administrator".
OR
Set your app ICON to run application always as Administrator.
Right click, select Run as Administrator. It should not cause any issue now and installation should work fine. See Issue #72982 SDK Manager cannot update when installed in C:\Program Files (x86), unless run as Administrator.
I think you must put the android SDK file in a path without spaces and because eclipse can't read the file
try it and give me your feedback....

I can't get IntelliJ to recognise my Android SDK

I am trying to make Android programs using IntelliJ. Unfortunately, I cannot get the Android SDK to be recognised on IntelliJ. (I.e. Eclipse has Android SDK Manager installed just fine.)
I select create new project from scratch.
I give the project a name and select make Android module.
Create source directory (next).
The computer then shows Android SDK none. I click the ellipses (...) and the program can see my JDK files.
I click on the + and select Android SDK.
I then find the directory c:\Program Files (x86)\Android\android-sdk.
However, when I click OK a dialog box appears stating "Please select Java SDK". It only gives me the choice of 1.6 (and not the other one 1.7). I then press OK for 1.6.
Finally the computer then reports it cannot find any Android targets in this SDK.
Please help!!!!
Before creating a new Android Project on IntelliJ Idea, you need to configure the Java and Android Development Kits at the IDE level.
Assuming you already installed the JDK and the Android SDK and you just launched IntelliJ (I'm using version 13.0.2):
Press Ctrl+Shift+Alt+S (to access the Project Structure dialog)
On the left navigation pane, click on 'Project Settings->Project'
On the right navigation pane, you should see a drop-down list displaying '<No SDK>'
Click on 'New', select 'JDK' and choose the path to your JDK
Click on 'New', select 'Android SDK' and choose the path to your Android SDK
Please note you have to define the JDK before the Android SDK.
This procedure is documented at:
https://www.jetbrains.com/idea/webhelp/configuring-global-project-and-module-sdks.html
On linux, run tools/android under the SDK to run the Android SDK Manager. Then download one or more of the platforms. Check out "SDK Readme.txt" in the SDK directory for more. Once you're done there, you will be able to select a platform, and your IntelliJ system will start to run.
For others who may encounter this issue on Intellij14 + Mac - the solution that worked for me was to
1) Open intellij - select add android sdk from the project settings section, select the android-sdk-macrox root directory
2) the sdk manager pops up - download at least 1 package.
3) Restart intellij (without this restart, it didnt seem to work)
Oddly, IntelliJ 12 Community doesn't give us the option to select the JDK location for Android projects.
I've found a workaround for this:
First, create a new Java project. I used 'Java Hello World' project. This'll give you the chance to select your JDK.
Install the Android SDK and run the Android SDK Manager to install tools and a platform, as others have mentioned.
Create a new Android project. Under 'SDK', select the Android SDK. Intellij will remember the JDK location you defined in step #1.
On Mac, IntelliJ won't detect the installation of Android SDK. When selecting SDK for new Android module, select your android-sdk-macosx folder as your location.
More info: https://peterboctor.wordpress.com/2010/12/02/installing-the-android-sdk-on-mac-os-x/
Alternatively, Google just releases Android Studio which is a whole IDE base on IntelliJ.
With IntelliJ IDEA 14.1.2, I couldn't select the Android SDK install location on Mac OS X. That install location was ~/Library/Android/sdk, which IntelliJ wouldn't navigate to because ~/Library is a hidden folder. So I created a symlink in my home directory (ln -s ~/Library/Android/sdk/ ~/AndroidSDK) and IntelliJ DID let me select that.
(linux, osx)
When going standalone (without Android Studio), make sure you have the sdk tools (from the standalone sdk, "command line tools" option), build-tools, platform-tools and an sdk (platform).
./tools/bin/sdkmanager --update
# list available packages (pick a version)
./tools/bin/sdkmanager --list
# install requeriments
./tools/bin/sdkmanager "build-tools;26.0.0"
./tools/bin/sdkmanager "platforms;android-26"
# you might get wrong permissions from the downloaded packages
sudo chmod -R +rxw tools # will need write perm to create AVDs
This may help others. I found that I couldn't get IntelliJ (MacOS) to recognise the Android targets in the android-sdk-macosx folder. Moving the Android SDK folder out of the Applications folder and into a directory in my User's folder resolved the issue. IntelliJ was then able to recognise the Android SDK. It may have had something to do with permissions, but no errors were shown to indicate this. Hope this helps.
I had the same problem with version 15 intelliJ after upgrading on OS Linux Ubuntu 12.04
I found because the android sdk wasn't in the home folder of the user running intelliJ that you had to change the Folder/file permissions before it would see this
Mine was in the root
Issuing the command chown -R <yourusername> /path/to/android_sdk_dir
solved the problem for me
If this fails after doing this delete the ~/.ideaC(Lastversion number) any previous ~/.ideaC(Lastversion numbers) folder's and then re open intelliJ
You will have to go through the initialization of the IDE and give the path to your Java installation ver8 upwards only on intelliJ version15 and thereafter your android sdk installation
I found this can also cause conflicts
As a further tip add the following to the very end of your ~/.bashrc using one of your editors my (nano , vi etc )
Example vi ~/.bashrc
The following lines set the Android Path
PATH=$PATH:/path/to/android/:/path/to/android/tools
export PATH
For SDK version r_08 and higher, also add these two lines for adb:
PATH=$PATH:/path/to/android/platform-tools
export PATH
for setting android emulator to 32 bit version add this line
export ANDROID_EMULATOR_FORCE_32BIT=true
Exit your choice of editor (vi , nano etc ) and
Re invoke bashrc with the command below
source ~/.bashrc
Hope that helps you
You need to run SDK Manager.exe to download at least one of the platforms, then you'll be able to select the downloaded platform, see also this tutorial.
If you are behind a proxy server :
1.After starting the Android-SDK-Manager, go to :
Tools > Options.
Add your proxy details.
2.Then go to Packages > Reload
3.After this you should be able to see all the platform options of the Android.
PS : Pheew! Spent an hour figuring this out!
You can create symlink to your sdk location, even to hidden folder. And then point point IDEA to symlink.
For example: ln -s /Users/*username*/Library/Android/sdk /Users/*username*/androidsdk

Don't see Android SDK and AVD Manager when execute android tool command

I'm developing android on Mac OS.
In the first time, I use android tool command (<sdk>/tools/android) to launch Android SDK and AVD Manager as this link: http://developer.android.com/sdk/adding-components.html. It's OK. In Mac OS, the program's UI is same as in Windows as the images in the link.
But now, when I run that command, it only start Android SDK Manager as the image below:
How do I revert it? Please help
From the Terminal change to the <sdk>/tools/ directory and type the following to display the AVD Manager window (I'm using android-sdk r15):
$ android avd
I downloaded and installed Android 4.0.3 (API 15) today and there is no "avd" tool in the /tools/ or the /platform-tools/ folder. However, you can access the Android Virtual Device Manager (AVD Manager) through the Android SDK Manager.
execute the "android" tool with no arguments in the "Tools" window,
select "Manage AVDs"
Credit to user1450537 who gave this answer:
"I know its a bit late answer but for future generations - this is how its done: Click on Window > Customize perspective > Command Groups Availability tab. Check the "Android SDK and AVD Manager" option and hit the OK button."
You can use the command line for opening Android SDK Manager, but make sure Android SDK manager is installed in your machine.
Use this command in terminal: ./android avd
I had to add the AVD manager to the menu. in Default Preferences I navigated to
Appearance & Behavior > Menus & Toolbars
I found AVD Manager under
Main Menu > Tools > Android
I clicked on AVD Manager, then clicked "Add After" and found the tools menu, and added the item inside the tools menu. Restarted AndroidStudio, and the menu item was there under a submenu
On the Run Configurations screen, there is a "Manager..." button, which will open up the AVD Manager. You must first select "Automatically pick compatible device..." to enable the "Manager..." button.
In the Android tool, you can select from the menu bar Tool then Manage AVDs...
Suppose the SDK is installed in the opt folder, you could try the following command:
sudo /opt/android-sdk/tools/android ; exit;
This will open the SDK manager.
You need the sudo as often the storing folder (opt in this case) is protected from writing.
I've solved. You are not in java perspective. Open going to Window -> Open Perspective -> Java.
You can also add <sdk>/tools to your PATH if you use it often. Open your ~/.bashrc file and add this line:
# <sdk> is path to your SDK, e.g. /Users/akarienta/Library/Android/sdk
export PATH=${PATH}:<sdk>/tools
Then just reload the file by source ~/.bashrc or restart the terminal. Since now you can use commands like these (in whatever location you are):
# opens Android SDK Manager
$ android
# opens Android AVD Manager
$ android avd
So you are missing the AVD mannager? This newer update has separate executables for SDK and AVD, so you don't have to wait the SDK to update library. The "AVD manager" executable resides in the same folder as the "SDK manager". Try manualy navigating there. I don't use Mac so I can't help you there, but it should be in the same folder.

Android SDK Manager Not Installing Components

Not sure what I'm doing wrong here. I installed the Android SDK Manager, and am now trying to install a platform like the Android Dev website suggests. Once I clicked install I got an error stating that the Manager could not create a temp folder within the Android directory. So I created it. Now I'm getting this error:
Downloading SDK Platform Android 2.3,
API 9, revision 1 File not found:
C:\Program Files
(x86)\Android\android-sdk-windows\temp\android-2.3_r01-linux.zip
(Access is denied)
There is also a little message under the progress bar that says "Done. Nothing was installed."
I'm running Windows 7 Ultimate, in case that's of any use.
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.
Chose 'Cancel' and click on 'X' on the top right corner.
Chose 'Do not re-run the setup wizard' and click 'OK'
Start Android Studio again and go 'Configure'-->'Project Defaults' --> 'Project Structure'
Add 'C:\Users\username\AppData\Local\Android\sdk' to 'Android Location' and click 'OK'
Click on 'Start a new Android Studio project'.
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.
In my case I was using Windows 7 with the 64-bit OS. We installed the 64-bit Java SE and 64-bit ADT Bundle. With that set up, we couldn't get the SDK manager to work correctly (specifically, no downloads allowed and it didn't show all the API download options). After trying all of the above answers and from other posts, we decided to look into the Java set up and realized it might the 64-bit configuration that's giving the ADT bundle grief (I vaguely recall seeing/reading this issue before).
So we uninstalled Java 64-bit and reinstalled the 32-bit, and then used the 32-bit ADT bundle, and it worked correctly. The system user was already an admin, so we didn't need to "Run as Administrator"
For those running SDK Manager in Eclipse, selecting "Run As Administrator" while starting Eclipse.exe helps.
For Linux/ubuntu User
Why it's happening?
due to lock icon on some folder(not having read/write access) in
"/yourpath/android-studio-SDK"
Sort and sweet solution
-Open Terminal (Ctrl +alt +t)
-copy pest sudo chown -R $USER: $HOME
-wait for a while.....
-now Try again to update your SDK
Happy Coding :)
The Access denied is because Windows doesn't give the default write and modify permission to the files in its install drive viz. c:
To resolve this issue I usually use a separate drive or in your case, you need to set the access rights to the specific folder in the options
right click -> options > security -> edit
In windows 8:
right click on windows button
List item
CDM as administrator
Press 'yes'
paste this $ C:\xxx\xxx\AppData\Local\Android\sdk\tools\android.bat
If you use SDK Manager in Eclipse:
Option 1: Right-click on eclipse.exe and select "Run As Administrator".
Option 2: If you don't want to start Eclipse.exe as Administrator just install/copy Eclipse installation files from "C:\program files\Eclipse ADT Bundle\" to some unprotected folder, like "D:\android\". Run "D:\android\eclipse\eclipse.exe", select menu item "Window => Preferences => Android" and change "SDK Location" to "D:\android\sdk\". After that you'll be able to install new packages in Android SDK Manager.
go to sdk folder and right click on SDK manager and run with administrator and enjoy installing.
To go along with what v01d said:
Using Android Studio for Mac OS X, the SDK folder could also be at /Users/{user}/Library/Android/sdk, where {user} is your username.
To find out where the partial SDK installation is, go to Configure > SDK Manager in Android Studio, then click edit at the top. This should pop up a window and show the location.
Copy this path and paste it front of the cd command in a terminal. Finally execute sudo ./android sdk to launch the standalone SDK manager.
EDIT (July 14, 2016):
The "android" binary file could also be at /Users/{user}/Library/Android/sdk/tools.
Solution for macOS
click right on AndroidStudio.app -> show Package Contents -> MacOS
now drag & dropping the studio-executable in a terminal
sudo! (Ctrl+A places your cursor in front)
start the SDK Manager inside AS to get your stuff (you will have root access)
https://www.youtube.com/watch?v=ZPnu3Nrd1u0&feature=youtu.be
you need 3 steps:
1- Configure -> "Appearance and Behavior" -> System Settings -> HTTP Proxy. I selected
"Automatic proxy configuration url:"
2-Delete your ~/.Android* folders (c:\users\ur user).
3-Run Android Studio. It will show you a welcome wizard where it tries to download the SDK again.

Categories

Resources