Trying to update Android SDK - android

In trying to update my SDK to the latest, some things installed, but others* didn't.
*SDK Platform Android 4.0, API14, revision 3
Google APIs by Google Inc., Android API15 revision 1
Google APIs by Google Inc., Android API14 revision 2
Sources for Android SDK, API14, revision 1
I got this err msg:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-= Warning ! =-
A folder failed to be moved. On Windows this typically means that a program is uing that folder (for example Windows Explorer or your anti-virus software.)
Please momentarily deactivate your anti-virus software or close any running programs that may be accessing the directory 'C:\Program Files (x86)\Android\android-sdk\platforms\android-14'.
When ready, press YES to try again.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Even after manually stopping a McAfee service and MS Malware service (MS Security Essentials) via
Task Manager, I still got this err msg.
The error highlighted (in brick red) in the Android SDK Manager Log is:
Failed to rename C:\Program Files (x86)\Android\android-sdk\platforms\android-14 to C:\Program Files (x86)\Android\android-sdk\temp\PlatformPackage.old01.
Is this something I should do manually - would that allow the update to take place?

If you started the update from eclipse, it might help to exit eclipse, and go to your sdk/utils directory and start de SDKmanager from there. This worked for me after I got the same message today.

I don't know if this will help but generally a few things might cause problems like:
Having a device connected or the emulator running.
Forgetting to run the Android SDK tool as Administrator.
Some errors can occur with the windows "program files (x86)" path. I tend to just move the Android folder to the root C path so the SDK would be at C:\Android
If you've covered all that then I'm not sure. It should usually just work without you having to do anything else.

That is the answer. C:\Program Files is protected against user modification.
Unfortunately, the SDK Manager does not escalate it's privileges. That would be a nice addition to the Windows version.

Related

Serious problems in Configuring Android SDK with Eclipse

I am having serious problems in Configuring ADT with Eclipse. I am using Windows 7 Home Premium version.
The Eclipse (64 bit) that I am using is:
Eclipse Classic 3.7.1
Eclipse Java EE IDE for Web Developers.
Version: Indigo Release
Build id: 20110615-0604
Java code runs without any problem in this Eclipse. For running Android:
at first, I went into Eclipse-> Help menu and then Install New Software.
Clicked Add, named it ADT and for location used: http://dl-ssl.google.com/android/eclipse.
The new window that appears, I have clicked all of those boxes and choose Next. Upto this point, everything is OK, ADT is installed and I am be asked to restart Eclipse. When Eclipse launches, a new window appears and asks me to either install the Android Software Development Kit (SDK) or choose an existing SDKs location. I chose to install Android Software Development Kit (SDK) (I checked all the options). I have set SDK location to: C:\My_Workspace\Android_SDK. After everything finishes I see two errors in the Eclipse console:
[2012-01-02 14:29:37 - DDMS] DDMS files not found: C:\My_Workspace\eclipse-SDK-3.7.1-win32-x86_64\eclipse\platform-tools\adb.exe C:\My_Workspace\eclipse-SDK-3.7.1-win32-x86_64\eclipse\tools\hprof-conv.exe C:\My_Workspace\eclipse-SDK-3.7.1-win32-x86_64\eclipse\tools\traceview.bat
[2012-01-02 14:30:47 - DDMS] DDMS files not found: C:\My_Workspace\Android_SDK\platform-tools\adb.exe C:\My_Workspace\Android_SDK\tools\hprof-conv.exe C:\My_Workspace\Android_SDK\tools\traceview.bat
Note, I have tried to install the SDK at the default location given by Eclipse. But I see the same errors.
If I restart Eclipse an error appears saying:
"Could not find folder 'tools' inside SDK 'C:\My_Workspace\Android_SDK\'".
If I click into Window ->Android SDK manager, I get another error message saying:
"location of the Android SDK has not been setup in the preference."
If I go Window->Preference->Android, I see that, the SDK location is set to "C:\My_Workspace\Android_SDK"
But on top, there is an error message saying, "Could not find folder 'tools' inside SDK 'C:\My_Workspace\Android_SDK\'."
Inside the C:\My_Workspace\Android_SDK\ folder I see only two sub folders:
add-ons
platforms
But there is nothing inside these folders.
Inside "C:\Users\anis_huq.android" folder I see a folder called AVD (contents empty) and file called "ddms".
What is going on? I am confused!
P.S. the post: Could not find folder 'tools' inside SDK does not help my cause.
Problem solved after 1.5 days of work. This is how:
When you get the error:
[2012-01-02 14:29:37 - DDMS] DDMS files not found:
C:\My_Workspace\eclipse-SDK-3.7.1-win32-x86_64\eclipse\platform-tools\adb.exe
C:\My_Workspace\eclipse-SDK-3.7.1-win32-x86_64\eclipse\tools\hprof-conv.exe
C:\My_Workspace\eclipse-SDK-3.7.1-win32-x86_64\eclipse\tools\traceview.bat
[2012-01-02 14:30:47 - DDMS] DDMS files not found:
C:\My_Workspace\Android_SDK\platform-tools\adb.exe
C:\My_Workspace\Android_SDK\tools\hprof-conv.exe
C:\My_Workspace\Android_SDK\tools\traceview.bat
go to the site: http://developer.android.com/sdk/index.html and download, install;
installer_r16-windows.exe
After the installation, you will still see some errors like:
Fetching
https:// dl-ssl.google.com/android/repository/addons_list-1.xml Failed
to fetch URL
https:// dl-ssl.google.com/android/repository/addons_list-1.xml,
reason: peer not authenticated Fetched Add-ons List successfully
Fetching URL:
https:// dl-ssl.google.com/android/repository/repository-5.xml Failed
to fetch URL
https:// dl-ssl.google.com/android/repository/repository-5.xml, reason:
peer not authenticated Done loading packages. Fetching URL:
https:// dl-ssl.google.com/android/repository/repository-5.xml Failed
to fetch URL
https:// dl-ssl.google.com/android/repository/repository-5.xml, reason:
peer not authenticated
The problem is not so evident from the error messages. We figured that, the HTTPS is actually causing the problem. So, start
Android SDK Manager->Tools->Options and now CHECK the box that says:
force https://... sources to be fetched using http://
and then click Packages->Reload.
Everything will be installed as your wish! Now run Eclipse->Window->Preferences->Android and set the location of the newly installed Android SDK (i.e. the location of "android-sdk" folder). And you are ready to go.
1.5 days wasted for this.
Try installing the Android SDK separately first. Then get Eclipse configured appropriately. You might need to run the SDK installer as an administrator in order to have some permissions set up appropriately.
Have you tried downloading ad installing the Android SDK manually, then pointing Eclipse to that location? You will need to run "SDK Manager.exe" to download at least one platform...
Also... Make sure you don't have any spaces in the path to the Android SDK and Eclipse or you might get strange errors.
In the last time I face all the time with such strange errors. The solution in these cases usually is the following.
I guess that you use JDK 7. Android SDK is not compatible with JDK 7. You have to use JDK 6 or JDK 5 (but 5 is too old). Am I right?
Remember the path where you install the android sdk and provide the correct location at window>preferences>android. On my windows 7 system the location is C:\Program Files (x86)\Android\android-sdk. After you provide location in preferences, click apply.
I had this too and just solved it. For me, it turned out that I didn't have all the libraries like the tools package.
Other things to keep in mind that helped me overcome related errors:
1) When giving urls from where to download, if the https doesn't work, try http
2) Run your eclipse as administrator if u r running it from Windows 7 - that will help you avoid permissions problems.

Android programming "no crunch" error

i've just installed eclipse and tried to run my first app, unfortunately the error below always
popped out:
Unknown option '--no-crunch' Android Asset Packaging Tool
I've done the following just like what people adviced but it DIDN'T HELP,
-After updating to ADT r14, go to Window -> SDK Manager (in Eclipse)
-Check on 'repository', uncheck "installed"
-Wait for packages to load, then select all support packages, accept all and install them
-Restart Eclipse
-Run your apps on new ADT r14, without 'crunch' errors
As a result, i keep getting prompt box asking me to momentarily keep deactivating my anti virus. because there might be a program that accessing the directory.
Can anyone please help & provide me the solution??
thank you
I had good luck updating the Android SDK tools to revision 15 and Android SDK Platform tools to revision 9. But this was a stab in the dark that worked. What I am trying to say is I don't understand the reasons for this to work. This solution is easy to try. If it works for you then vote for this answer.
There is a similar question on Stack Overflow at Google APIs throw no-crunch error for android
Other notes:
Running on Windows 7 and Eclipse Version: Indigo Service Release 1
Build id: 20110916-0149. Compiling for Android 2.2.
Also I updated my Java JDK yesterday to version 1.6.0_25, which may not be relevant but I can't think of another reason for this error to start today.
Android "no crunch" Eclipse aapt "Unknown option '--no-crunch'"
Well, this problem is mainly caused when you have ADT Plugin updated but not repositry in SDK Manager. In Eclipse, Instead of updating sdk manager from Windows -> Android SDK Manager -> Settings... It might not update and normally displays error: Failed to fetch URL https://dl-ssl.google.com/android/repository/repository.xml. To avoid this, try this solution, hope it surely works:
Go to folder Android SDK where your sdk is placed(in my case"D:/Android SDK/android-sdk-Windows").
From this folder double click "SDK Manager.exe".
When Android SDK and AVD Manager window opened then click Settings.
In Proxy Settings, it will ask for a HTTP Proxy Server and HTTP Proxy Port.
Enter the IP address and the port number being asked.
In Misc Tab check "Force https://... "
Turn off your firewall and temporarily disable your antivirus.

Can't update Android SDK tools to rev13

When I try to update my SDK to the latest version, i get the following error:
A Folder failed to be moved. On windows this typically means that a program is using that folder (for example Windows Explorer or your anti-virus software.) Please momentarily deactivate your anti-virus software or close any running programs that may be accessing the directory 'C:\adt\android-sdk\tools'. When ready, press YES to try again.
I checked with Process Explorer what processes use that directory and, surprise surprise, it's the SDK Manager that I use for the update.
Has anyone solved this?
I was also facing the same kind of error when i was trying to installing SDK, later on i found that there is a Kaspersky anti-virus installed in my machine and due to it, android is giving me this error.
Once i have paused the Kaspersky security service then i was successful to download the SDK and installation for the same.
So my clue is you should stop any antivirus service.
This problem was resolved in Android SDK Tools rev14.

Unable to launch the android emulator from Eclipse 3.7.0 [duplicate]

This question already has answers here:
Closed 11 years ago.
Possible Duplicates:
Not able to launch android emulator
Starting the Android emulator in SDK tools, revision 12
http://developer.android.com/sdk/eclipse-adt.html#installing I followed the instructions here for a windows 7 machine using a 64 bit operating system. It's a clean system install. I first installed the Android SDK and then installed Eclipse and then installed the ADT Plugin.
At first, simply nothing was happening. I'd click window-> android and it'd bring up the list of emulators I had made. I'd select one then click start and nothing. ADB.exe wasn't even in my systems resources. I made sure Kaspersky had added adb.exe to it's trusted list and tried again, still no dice.
I then saw an article saying I should move adb.exe from platform-tools to just tools so I tried that. That made it switch from doing nothing (and reporting nothing in the console or logcat) to where it is now. It says
invalid command-line parameter: Files.
Hint: use '#foo' to launch a virtual device named 'foo'.
please use -help for more information
Any more theories on what I can try would be greatly appreciated.
For further clarification the foo message happened with platform of 2.3.3. or 3.2 selected. When trying platform 3.0 it went back to nothing.
I had the same problem which was quite annoying me until I found a "fix" (well it does not solve the problem at its roots but helps a lot anyway):
Simple create a batch file with the following content:
CD "C:\Program Files\Android\android-sdk\platform-tools"
adb kill-server && adb start-server
Of course you have to adjust the correct android platform-tools path.
So whenever a running emulator is not recognized by Eclipse or DDMS simply run this batch.
I had this trouble when my SDK was installed in 'Program Files'.
The invalid command line parameter was the space in the program files part of the argument. I guess Android coming from a Linux world means that whitespace is it's enemy! Despite this being the default install location.
I moved the whole SDK (emulator included) to the root 'C:\' drive. It then started working a treat.
There is bug on the windows version.
Open a command line prompt in the /tools/ folder (which you can find in the sdk folder) then run the emulator-arm.exe -avd nameOfYourVirtualDeviceHere
(btw this will not fix the real issue but allows you to continue to work)

Error received when updating the SDK with the SDK Manager

I'm completely frustrated with the Android SDK Manager.
I'm running Win 7 Home edition and have the SDK installed in its own top level directory on my D:\ drive.
When I run SDK Setup.exe from the command line (and I've even opened the prompt as an administrator), I get an error when trying to update the packages.
The SDK manager is telling me that I need to install the SDK Tools rev 7. But when I accept the license, I get an error message stating:
"A folder failed to be renamed or removed" yada yada yada. The Installing Archives window says "Failed to rename directory D:\android-sdk-windows\tools to D:\android-sdk-windows\temp\ToolPackage.old01."
I looked here for help:
http://groups.google.com/group/android-developers/browse_thread/thread/4b784f3eb1e096fd/ecadfb28ce5daf5f?lnk=gst&q=cannot+rename+folder#ecadfb28ce5daf5f
but the content there didn't help.
I DO have my antivirus (AVG) disabled.
I DO NOT have any other programs running -- just the command prompt to launch the SDK Manager.
I have even given the everyone group, for the D:\android-sdk-windows\ folder, full control.
I tried to rename the tools directory before starting the SDK Manager but then I get an error that a batch file cannot be found when I try to launch SDK Setup.exe. Grrrr.
None of this works.
Suggestions how to get the package to update without error are greatly appreciated.
Thanks!
A simple thing,
There will be zipped file after this error has been occured. Meaning that Updated tools got store as
tools_r16-windows.zip in C:\Program Files\Android\android-sdk\temp
Just extract it and copy it in our tools folder
C:\Program Files\Android\android-sdk\tools
Enjoy:)
I think ths might help. Please give your comments!!
If you get this error while using Eclipse on a 64-bit Window 7 (might 32-bit as well), exit Eclipse, go to your SDK folder and run "SDK Manager.exe" as Administrator. In my case, Eclipse turned out to be what locked the folder in the first place.
# Stratos - Thank you for your instructions, they worked for me.
Go to Android\
android-sdk\
tools\
Delete "source.properties" (Right click - delete)
Open SDK Manager and update
And everyone lived happily ever after...
You can't use 64 bit java or 64 bit eclipse. That's almost certainly your problem.
Had the same problem. For me it was a bit circular, the SDK manager had a hold at source.properties and closing the process terminated the update. I deleted android-sdk\tools\source.properties before running the SDK manager and it all worked. Oh and I was not updating through Eclipse so it is not an Eclipse problem.
I can't vote yet, or I would have voted for Stratos.
I had already disabled my Norton antivirus (after reading other posts).
Removing the source.properties file helped.
Don't forget to run SDK manager with admin rights if not already.
There is another simple way:
When the SDK asks to install the Java SE JDK press back and then press next. This time it will detect the installed JDK. I solved this problem twice with this method
Use Unlocker to unlock the tools folder.
Right click on tools folder -> Unlocker. This way you don't even have to find out what is locking the folder...
Start task manage and end Adb.exe. Thisnisnthe program that has a hold on the folder. Rename the tools folder to some other name eg. 'toolsold'. Then extract the zip file containing the new tools folder. Rerun the updates and it should be detected as updated and it should proceed with the outstanding tasks.
Run SDK manager as Administrator, this fixed for me

Categories

Resources