Error Android SDK - android

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....

Related

Android Studio 3.1.2 Run button not working

Android Studio 3.1.2 Run button enabled. But when click on run button no action happened.
I restarted android studio and my windows 10 also. But still Run button click not showing anything.
Follow the following steps:
There's a Run option on the menu, locate it and click on it.
Click on Edit Configurations
Click on Android Application on the left side and then click the + button.
Choose Android Application from the pop-up menu. Then pick the module (app). Then click apply and then Ok.
If this doesn't work, try re-importing the project into Android Studio, that should fix the problem.
I hope this helps.. Merry coding!
I guess you already solved it, but I got the same issue and found a solution. For me the problem was that adb wasn't found. After reinstalling platform-tools it got solved.
So try opening SDK Manager from Tools -> SDK Manager, go to SDK Tools tab and uncheck Android SDK Platform-Tools. After applying changes install it again.
I uninstalled android studio. Make sure that you delete every possible file, I manually deleted a few files after uninstalling android studio (yes not all files get deleted when you uninstall and specifically user settings). Then download again the .exe from their official website, it will ask you whether to import settings from the previous version, select no. And download all dependencies (make sure you have a good access to internet) and there you go!
I found the error. adb.exe was deleted from platform-tools folder and error was
"Unable to locate adb java.lang.IllegalArgumentException: Unable to
locate adb" .
Just copy paste adb.exe into platform-tools folder and run again it works perfectly..
Thanks.
if you have anti-virus try to disable it and check if adb-file.exe is deleted or quarantined by it.
in my case Avast was stopping the android studio from running

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

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.

can't install support library

I am trying to start developing android apps. I think I need to install support library-revision 10 first.However I get error...
I tried to install it by using sdk manager. It gives an error like this:
Downloading Android Support Library, revision 10
File not found: C:\Program Files
(x86)\Android\android-sdk\temp\support_r10.zip (access is denied)
Done. Nothing was installed.
Can anybody help me?
Try running whichever program you are using to install as an administrator,
run your SDK Manager as an administrator. Right click on it and choose "Run as administrator" It should install it then.(Right Click -> Run As Administrator).
This can happen when SDK Manager tries to modify the file that is being used by eclipse. Try this Exit eclipse(you may need to restart your system aslo) - go to your android sdk folder - open SDK manager directly from there(not from eclipse)- now update the libraries.

Cannot upgrade Android SDK

I have closed every window, restarted the computer. But Eclipse is telling me: "C:\Program Files\android-sdk\tools is being accessed....I even deleted the directory but I still get : how to fix?
Failed to rename directory C:\Program
Files\Android\android-sdk\platform-tools to C:\Program
Files\Android\android-sdk\temp\PlatformToolPackage.old01.
I have had this problem on Windows too. Instead of updating it through Eclipse, try the stand-alone option:
Close Eclipse
Open a Command Prompt window (ideally in
Administrator mode)
Run the command "android"
If you have the SDK tools directory in your path it will open the same UI you get in Eclipse but without additional file locking. If it is not in your path have a look in C:\Program Files\Android\android-sdk\tools and run "android.bat" from there.
Also, once you have updated the SDK, don't forget to fire up Eclipse and, on the Help menu, click "Check for Updates". You may well find the ADK Eclipse plugin needs to be updated too - this often goes in step with SDK updates.
Supposedly, if you use the SDK Manager.exe program rather than tools\android.bat, it works. However, I've never had any luck with that.
My traditional approach has been:
Duplicate the tools\ directory to create a foo\ directory
Adjust your PATH and other environment variables to point to foo\
Run the tools\android.bat out of foo\
Do the upgrade, which should work
When done, close out of the SDK and AVD Manager, revert your PATH and such to point back to tools\, and get rid of the foo\ directory
I'm guessing that adb is restarting with the computer. Try adb kill-server before upgrading
Another simple fix:
Close Eclipse. Open the directory where your SDK is located (C:\Users\user35\android-sdks) and run SDK Manager (as Administrator).

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