Android SDK Content Loader failing with NullPointerException - android

I've just recently started getting an error any time I interact with the Android SDK and AVD Manager in Eclipse Helios
I've tried reinstalling the Eclipse plugin and the Android SDK but to no avail.
If I go to the "Installed packages" page and click refresh (or install or remove a package) I get a popup box saying that
'Android SDK Content Loader' has encountered a problem.
parseSdkContent failed
java.lang.NullPointerException.
Here is the full log:
Stack Trace
java.lang.NullPointerException
at com.android.ide.eclipse.adt.internal.sdk.Sdk.loadTarget(Unknown Source)
at com.android.ide.eclipse.adt.AdtPlugin$10.run(Unknown Source)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
Session Data
eclipse.buildId=M20100909-0800
java.version=1.6.0_20
java.vendor=Sun Microsystems Inc.
BootLoader constants: OS=linux, ARCH=x86, WS=gtk, NL=en_IE
Framework arguments: -product org.eclipse.epp.package.java.product
Command-line arguments: -os linux -ws gtk -arch x86 -product org.eclipse.epp.package.java.product
Has anyone else encountered this recently?
It doesn't seem to be affecting actual Android development but its just kinda annoying.

The issue is in the your-avd-name.ini that is located at ...\<user-profile>\.android on your Windows machine (if you're Windows user). When any error occurs during the avd.ini parser, the Google ADT plugin tries to access a map that is null. The workaround is to delete the offending .ini file and recreate your avd(s).
This information was posted here: http://community.developer.motorola.com/t5/MOTODEV-Studio-for-Android/Android-SDK-Content-Loader-has-encountered-a-problem/td-p/6565

I solved the problem by deleting the .android directory in my user profile.

Solution:
Step 1. Find the folder named: > .android
This folder can be located in your Windows user directory, for example in Windows 7/8:
C:\Users\YOUR_WINDOWS_USERNAME.android
Step 2. Delete this folder .android
Step 3. Restart Eclipse and it is OK now

I solved the problem by deleting the .metadata folder from workspace

Go to C:/Users/<profile-name>/.avd and delete the .ini file of the AVD..Restart Eclipse..
otherwise if you don't know what file to delete or the above solution did not work for you, delete the entire created AVD folder..and restart eclipse..

The issue is in the your-avd-name.ini (config files) that is located at .android (search it)on your Windows machine (if you’re Windows user). When any error occurs during the avd.ini parser, the Google ADT plugin tries to access a map that is null. The workaround is to delete the offending .ini file and recreate your avd(s).

Try to delete .android folder from
C:\Users\Your User Name\.android
and open your eclipse and follow this Structure to configure your SDK for either installing new SDK or from installed one

I believe the trouble was with your ADT tools. If you had run eclipse plugin updates (which would update ADT), problem would have solved.

I get this parseSdkContent failed problem sometimes when I select improper values for a virtual device, if that improper value results in a blue screen of death upon AVD launch: After the crash when the computer restarts the "parseSdkContent failed" error will come when starting Eclipse.
This will give you all sorts of errors that does NOT at all give you any clue to the problem, from all the errors you may be tempted to reinstall Eclipse or even Java, but dont do that, it could be much simpler.
The solution for me is pretty simple: delete your .avd folder and the .ini file in ..Users\.android folder.
Backing up your AVD is therefore a good idea since it becomes corrupted if it crashes with Besod during launch.

Ok I've no idea exactly what I did but I used the standalone AVD manager (/tools/android from the command line) and un-installed most apart from the "Android SDK Tools, revision 2".
And then reinstalled the parts I wanted and the error seems to have gone away..
Confused!

For some reasons my sdk/addons and sdk/platforms directories got corrupted and unreadable (computer crash), this caused my "'Android SDK Content Loader' has encountered a problem." error.
Had to delete/rename the entire sdk folder, download and install the sdk+packages again. In user/.android everything was fine.

For me, the source of the NullPointerException problem was a host-side Junit test project that references (and tests) code from an Android project. It didn't have a project.properties file. It's not an Android project, but for some reason the newer versions of the SDK somehow expects the file there. To fix the problem, I just copied a project.properties file from an Android project to the host unit test project.

First start the emulator from command line
emulator -avd yourDeviceName
after doing above step in my case eclipse started fine.
UPDATE:
There is no perfect solution to this problem other than starting all over again. The issue is still open.

My solution was simply to go to help->look for updates-> and install all android related updates. Once done, I restarted Eclipse, it told me I need to start the SDK Manager to update some stuff, I clicked the "Open SDK Manager" button it shows me, updated the dev tools, platform tools, added some latest APIs and viola, all is fine :)

just try to delete the avd folder inside the .android folder, which may also have ur sdk folder in the path. Just delete the avd folder and try to configure ur path of the sdk in the eclipse > preference > android. then try to configure ur new avd in the eclipse by clicking the avd manager and then adding a new avd with a new name and click the start.
Ur new avd device will launch.
Cheers
Prakash

I have deleted the .android for windows user.
if adb running stop it by adb kill-server and then delete the folder.
this worked for me I am using adt-bundle-windows-x86 on window 7.
the issue is with AVD. AVD are saved under .android folder so after new installation of adt-bundle-windows-x86 we need to delete this folder also.

I'm on Windows 7; I got this error on first startup of ADT-provided Eclipse. My particular variant referenced an inability to write to a location on my C: drive. I solved it using the .metadata trick from above; then I chose "Run as Administrator" and everything worked fine after that.

i have solved the problem by deleting the newly created AVD(Android Virtual Device) in "C:\Users\EAST.android\avd" where \EAST is my user name, in avd folder you will find two folders for each device e.g. myDevice.avd and myDevice.ini delete both the files and run you eclipse again

Solved this by deleting metadata and .Android
in workspace

Add following lines to .bashrc file.
export PATH=${PATH}:~/android-sdk-linux/tools
export PATH=${PATH}:~/android-sdk-linux/platform-tools
replace "~/android-sdk-linux" with path where you have saved the sdk folder.

This is a workaround (not exactly the solution). In Window > Preferences > Android > Lint Error Checking, uncheck "When saving files check for errors".
I am sure this might work for you .

Had a similar problem. From one day to another I wasn't able to start my (so far) well working App. "SDK Content Loader" and "NullPointerException" Errors would pop up.
Read the Answers here but didn't want to delete my .android or .metadata.
I tried to clean my Project and - tadaa - it worked.
So, before you start deleting your plugins and stuff. Try a clean or restart and clean.
Maybe this will already fix your issue. ;)

Related

android studio platform-tools missing adb.exe

Today, I clicked some update when I launch Android Stodio. I forgot what it is. Then, I run some code when there is a error
"8:34 PM IllegalArgumentException: Unable to locate adb"
Then, I google for few hours and still cannot solve my problem. And I found that there is no "adb.exe" under my platform-tools folder.
Can someone help?
my os is Window 10.
I have tried uninstall Android Studio and install it back. It doesn't help.
Edit 1: After I re-install the platform-tools, I get back the adb.exe.But, I run my program again, it does the "ADB initialization", my adb.exe file lose again.
I am writing the solution which worked for me:
go to SDK Platform Tools;
download SDK Platform-Tools for Windows;
extract zip file and copy to \AppData\Local\Android\sdk\platform-tools.
Had the same problem. Solution was that Avast deleted the adb.exe.
Try adding the SDK folder to your antivirus whitelist.
What worked for me (after having AS 2.x and AS 3.x installed and trying to get Canary 3.1 to work):
Sometimes during an update/trying to sideload a new version of Android Studio, the updater/patcher screws up. It might delete adb after saying it will stop and update it, it might be fastboot or aapt ... whatever.
What works for me is to delete the whole sdk/platform-tools folder, restart AS and get it to redownload the entire platform tools package.
Then start AS again and go to File->Invalidate caches/restart.
If you have been updating Java, you might also want to ensure your JAVA_HOME is correct and that your AS project has been set to the correct JDK (project settings).
Yep, looks like LOTS of folks (way too many, shame on you, Google) have come up with a missing 'adb.exe' symptom. (In my case, I claim that it never got installed at all, during my Windows-10 bundled installation of Android Studio,
version 3.1.2.)
Ok, here's my recommended solution (which I borrowed and modified slightly from
this question): Android Studio SDK installer hangs indefinitely at Unzipping 'platform-tools/systrace/NOTICE'
The second(?) answer is essentially correct..."Dx Arout" boldly and correctly recommends:
(1) Delete platform-tools from this location C:\Users\AppData\Local\Android\Sdk
and he/she's got the right idea, to then launch Android Studio and try to get it to complain and offer to fix the problem for you...says to:
(2) Then restart Android Studio. After gradle build finish it will ask for installation of missing tools. just click there. It should work fine.
Well, no, not quite. It didn't ask me anything, because I didn't get any
errors from current proj's build. So, I had to 'kick-it-in-the-*ss', by
launching Tools -> SDK Manager, choosing the middle tab ('SDK Tools'), and going to an already-installed entry named 'Android SDK Build-Tools 28-rc2' (your exact version entry may be somewhat different). So, click on its checkbox, choose 'Show package details' checkbox (down in lower-right corner). I lit up ALL the package variants, and forced it to install them all. That may have been overkill, but voila...once that completed, 'adb' DID get installed, as confirmed
when I launched a debug run. (Down in the 'logcat' tab's log-message window, the two RED headings, finally turned to black and debugging was finally USEABLE!
Cheers...
it's easy just go to your sdk location
like C:\Users\User\AppData\Local\Android\Sdk
there was to folder namely
platform-tools and platform-tools.backup.
open platfrm-tools.backup and copy the adb.exe and paste it to plaform-tools folder and now open the android studio again.studio will run smoothly and without any error
Thank you
I also faced the issue.
The avast antivirus had moved the file adb.exe to the virus chest and that was the cause of the issue. I have resolved it by restoring the adb.exe from the virus chest of avast.
Re-installing Android SDK Platform-Tools worked for me.
Go to: Android Studio >> Tools >> SDK Manager >> Appearance & Behavior >>
System Settings >> Android SDK >> SDK Tools
Uncheck Android SDK Platform-Tools >> apply
Check Android SDK Platform-Tools >> apply
The problem is solved. The issue I have is I upgraded the SDK platform-tools to 25.0.6. But My SDK Build-Tools is 25.0.3. (25.0.6 is not yet provided) I guess the version did not match which cause this problem.
I downgrade my SDK platform-tools to 25.0.3 and it is working as usual.
adb.exe won't appear if antivirus is installed and we need to whitelist this.
Anti virus block this because as it find .exe file so it will block it.
system deleted that file from platform tools u just make another copy of platform tools and whenever your system deleted your " adb.exe ". you can copy it to sdk/ platform .
this is a temporary solution i installed Quick Heal but its doesn't solve my problem
adb.exe is virus file for that its detected as malware
**
Solution 2 :
** Copy your SDK FOLDER in System folder where antivirus dont take action on it .
**
Solution 3:
1.Download new copy of Platform Tools
2.paste it into SDK
3.right click on adb.exe and go to security tab
4.disable access of deleting by user system USERGROUP
Solution 4
copy sdk in appdata/local it will solve your problem permanent .
Thank You
no adb found. I had to delete the virtual device from AVD manager create another. now virtual device connected succesfully

Error message in Android Studio when trying to run and load emulator for the first time

The error message is:
PANIC: Could not open AVD config file: C:\Users\Darth\.android\avd\Nexus_5_API_21_x86.avd\config.ini
I've looked in that directory and there is no config.ini file. Only a userdata.img file.
When looking in the AVD manager the actions column says "Failed to load". If I right click it and click details it shows an error of:
Error: Failed to parse properties from C:\Users\Username\.android\avd\Nexus_5_API_21_x87.avd\config.ini
Fixes attempted that didn't work:
1 - Try choosing a different device definition. (config.ini file still missing when choosing multiple other devices)
2 - sharing the .android directory with my whole homegroup (selecting a device still doesn't generate a config.ini file, same error persists)
FIX: Thanks for all the replies. The fix that worked was changing the Memory of the AVD to 512!
I also had this same error, but the cause wasn't mis-matched x64 vs x86. Turns out my emulator failed to load because the skin wasn't defined. The way that I fixed it was:
Remove any previous wear emulators that failed
Pick the Model (Round/Square) and Android version(Lollipop, for instance)
On the final screen, click "Show Advanced Settings"
Scroll all the way to the bottom and set the "Custom skin definition" to "AndroidWearSquare" or "AndroidWearRound", which should be at the bottom of the skins list
Then after you're finished it should all just work!
Just put the Android SDK in the same Drive where you have installed the Android Studio 1.0. There is a problem if these drive letters are different. This will definitely work for you.I have solved this last week.
Try to use an AVD Manager from C:\User\<%USERNAME%>\AppData\Local\Android\Sdk\
https://code.google.com/p/android/issues/detail?id=78577#c25
For windows:
1) in the environment variables add a new "system variables"
ANDROID_SDK_HOME=D:\Program Files\android-sdk-windows (select your home directory of android sdk )
2) modify system variables Path, add "%Android_SDK_HOME%\tools;"
I have created many emulators and never touch .android\avd\Nexus_5_API_21_x87.avd\config.ini
you just create an Emulator, try to avoid "warp user Data", chose the appropriate Device and target API, set the SD memory to amount you want, and do the same with external RAM,and there is no reason to not work.
guesses: may the \Nexus_5_API_21_x87.avd\config.ini is read only! or you don't have permission to access .android/ (share this folder to all users,and give them full acsess.
I hope this will help
As I mentioned above I was facing the same issue.
For me it looks like the bug of the build and definitely not the issue rights, while another file was perfectly created (userdata.img) as well as the whole folder for the avd.
Solution #1: without changing anything in installation, I just found config.ini file in the internet. For example here is the config.ini for Nexus_S_API_21
So then I created Nexus_S AVD and put the config file in the folder. Then it starts working.
The issue with this method:
limited devices
config updates manually through config file
I still had some issues, e.g. instead of displaying the project I was displayed with the home page of Android, and there was no my app
Solution #2: Then I totally removed the Android Studio and cleaned all the stuff and downloaded 0.8.14 from scratch, during installation I updated it once to v.0.9.9. and then didn't update further.
In this version - everything worked just fine without any manipulation. AVD created from the first time and when launched - the project screen is displayed opened with Hello World.
I had the same issue and I was able to fix it with the below solution.
Root Cause: My system is 32-bit and the config.ini file was present in
C:\Users\Saajan Pruthi\.android\avd\Nexus_5_API_21_x86.avd
instead of
C:\Users\Saajan Pruthi\.android\avd\Nexus_5_API_21.avd
Note the x86... I simply copied the config file into the later folder and it worked.
I had the same issue inside Linux. The problem was that made install with root and executed the Android Studio from mi normal user, so in the momment that I install Android Studio every files android for emule stay here:
/root/.android/avd/Nexus_5_API_21_x86.avd
/root/.android/avd/Nexus_5_API_21_x86.ini
So you need do copy the files at your user, then:
sudo cp -Rf /root/.android /home/YOUR_USER
I hope that be help. Regards.
I did the following and it worked:
moved the sdk folder from C:\Users\User\AppData\Local\Android\sdk to the Android Studio program folder under C:\Program Files\Android\Android Studio\sdk
Restarted Android studio and reconfigured it to point to the new sdk folder
Recreated the emulator and started it
I had this problem as well. I just removed the AVD and added it back again - emulator is running fine now.
I had the same problem, and it turned out that my hard drive was full. For anyone still looking for a solution, definitely make sure you still have space.

Updating Android SDK: "A folder failed to be moved."

While trying to update my Android SDK I am encountering this error when trying to install this particular package:
How do I fix this?
This happens once in a while on my Windows SDK (even when I don't have any antivirus or similar programs running, execute the SDK-Manager as an administrator and so on).
I just update the tools by hand in this case. Which means close the SDK-Manager after the error and open the ANDROID_SDK\temp folder. There should be a zip named tools_R16.zip or similar (don't remember the exact name). Unzip that. You should end up with a tools folder. Copy all the files from this folder into ANDROID_SDK\tools. Overwrite when asked. And take a backup of the SDKs tools folder beforehand, just in case something explodes.
After that, start the SDK-Manager again. The tools version should be updated.
The problem seems to be that Eclipse, or even the SDK Manager itself, locks the folder. Running android.bat from the tools folder should do the trick.
If you launched the SDK Manager from Android Studio then all you need to do is close Android Studio.
I presumed the SDK Manager was a modal dialog that was part of Android Studio - not a separate program.
thanks. this is how I fixed it:
I updated the tools by hand in this case. Which means close the SDK-manager after the error and open the folder android-sdk-windows folder. Using LockHunter, unlock all programs from holding a lock on the android-sdk-windows\tools\ folder. http://lockhunter.com/?ver=&vertype=pro&sm=main_window_64
RENAME the android-sdk-windows\tools folder beforehand to tools_DELETEME
There should be a zip named android-sdk-windows\temp\tools_r19-windows.zip. open that, You should see a tools folder in it. Copy that tools folder to android-sdk-windows\tools
After that, start the SDK-manager again. The tools version should be updated.
When you install tools/softwares use SDK manager. But don't use it when update. Do right click -> Run as administrator on android-sdk-windows\tools\android.bat file for updating tools. Always try to run commands as Administrator specially on Windows Vista/7/8. That'll fix most of permission issues etc...
You probably started the SDK manager from eclipse? I encoutnered the same problem, and fixed it by manually opening the SDK manager from the directy tools.
My solution was to start it from within eclipse - as Administrator.
well i had the same issue on windows 7 ... problem is that during the update it tries to rename the tools folder (inside the SDK folder) and that folder is used by a process "ADB" which is currently running ...
so you cannot do the update smoothly until you stop / kill that process ...
BTW copy pasting the new contents of tools folder from the temp would also work ...
With windows 7, when "failed to install popup" appears kill the process called adb (from task manager ctrl+alt+del) then press "Yes" and stuff is being installed.
I tried running android.bat and got the same error.
What worked for me was using unlocker to unlock the \tools folder.
Ensure you don't have any essential files or folder opened/being used by other applications including explorer.
I've read before, people take a copy of the platform-tools folder and run the update from a different location. This ensures you haven't got open the files it's trying to update.
Could also disable your antivirus for 5 minutes o0o0.
On Windows 7 and probably Vista, run Eclipse as administrator.
My problem was Windows 7 security. I opened up the security on C:\Program Files\Android to EVERYONE with FULL access and it then worked. I then removed EVERYONE after the update was complete.
I had to make a copy of the tools folder itself (keeping it at the same directory tree
level, thus "tools" and "tools-copy" were both in the "android-sdk-windows" folder).
Then ran Android.bat from that copy.
After the update just delete the tools-copy folder.
The error message was Failed to rename directory C:\devtools\android-sdk\system-images\android-21\google_apis\x86 to C:\devtools\android-sdk\temp\SystemImagePackage.old01. I deleted the C:\devtools\android-sdk\temp\SystemImagePackage.old01 directory by hand (it was a leftover? I don't know) and it was able to proceed.
Same error i got while updating sdk. It is because of targeted folder locked (access permission is denied).
You can resolve it as follows in "Ubuntu" :-
Press ALT + F2 and type 'gksudo nautilus' and navigate to the targeted folder like tools or extras and give create and delete permission.
then update, every thing will be working fine :)
First make a copy of tools folder in same directory (android-sdk or android-sdk-windows) then delete the original tools folder and then open the android.bat file by double clicking in tools-copy folder to launch sdk manager and install the tools.
If tools folder is not being deleted then use the unlocker LockHunter to delete the folder and then open android.bat to update the tools.
After successful installation of tools delete the tools-copy folder.
Close Eclipse or Android Studio if open.
It worked for me!!!
On my PC it was caused by monitor.exe running in the background. Terminating that proces solved the problem.
Close the currently launched android studio window from task manager by going to the studioprocess (So when closed there are currently no active studio windows). Then go to Android studio in windows explorer, select the studio64/studio(if 32 bit OS) and right click and select run as administrator.
In one line - you need to run Android Studio as a administrator.
These are the steps followed by me.
Restart the computer.
Open "C:\android\androidStudio\sdk\tools\android.bat" as admin.
Now install packages should run fine.
I know this is an old post but I want to write my personal solution to the problem:
Failed to rename directory C:\android-sdk\tools to C:\android-sdk\temp\ToolPackage.old01.
Obviously I have had the same issue and every time the Android tools needs to be updated it's a nightmare.
None of the solutions I found googling the net worked for me up now, but this is a vital job to maintain Android SDK updated. So I started to find an alternative working way to solve this issue and I found it finally.... at least... it works for me, even if it is a bit tricky.
The basic problem is that the android.bat batch file comes from the ~\tools\ folder and it's still in memory (running) while the same ~\tools\ folder needs to be updated (in our case, renamed).
The problem is that the android.bat runs java to launch swt.jar (the SDK tool), and it remains uselessly waiting for completion of this java program.
You can edit the android.bat and see the call in the latest row of this batch:
call "%java_exe% %REMOTE_DEBUG%" "-Dcom.android.sdkmanager.toolsdir=%tools_dir%" "-Dcom.android.sdkmanager.workdir=%work_dir%" -classpath "%jar_path%;%swt_path%\swt.jar" com.android.sdkmanager.Main %*
The problem is the "call" CMD command. It waits for the called external program completion.
But ther's another way to run external programs from a batch file: the "start" command. It launches an external program and terminates.
So I just replaced the "call" command with "start", so that after the change the latest row of my android.bat was:
start "" "%java_exe% %REMOTE_DEBUG%" "-Dcom.android.sdkmanager.toolsdir=%tools_dir%" "-Dcom.android.sdkmanager.workdir=%work_dir%" -classpath "%jar_path%;%swt_path%\swt.jar" com.android.sdkmanager.Main %*
Note: Keep the "" in between start and the application path. You can add text in those hyphens and this text will be the caption of the java.exe command window you will see after the changes. In my case I left the caption as an empty string but you can write there what you want.
After the changes, you can start the SDK and the android.bat will be no more waiting, leaving the SDK tool free to play (and rename the ~\tools\ folder without headaches).
Obviously, after updating the SDK tools, you have to redo the same changes in the new, updated android.bat batch file. This could be a bit unconfortable, but you'll have just to remember to make the changes before running the SDK tool and you'll have no other headaches while updating Android.
In Ubuntu following solved issue for me
cd [tools/directory/path]
sudo ./android
Solved this on my side by killing the adb.exe in Task Manager.
I just stopped the emulator, and problem was solved.

Can´t download Android packages through SDK and AVD Manager any more

That´s the error message:
Downloading Android SDK Platform-tools, revision 8
File not found: C:\Program Files (x86)\Android\android-sdk\temp\platform-tools_r08-windows.zip (Access denied)
When i look into my "temp" folder, it´s empty..
What´s the problem here?
Running "SDK Manager.exe" as administrator should solve your problem. That worked for me.
It seems to help to move it to another folder, I just moved the directory C:\Program (x86)\Android to C:\Android.
Using Windows 7 x64.
You should move your directory from C drive.It sometime happened with me so that i changed the Location of Android Sdk & tools because there is a possibility of window crasehd due to some uncertain reason so you will have to download all that Platform tools data again.
I think you should do following thing:
Install updated SDK.exe
Right click on SDK/AVD manager to Run as Administrator for plugins
Hope it may short out your problem.
This is old question but still actual and unconfirmed (unsolved).
SDK Manager creates sdk/temp folder and tries to copy there library archive files. So permissions are problem. You can either change permissions to a sdk folder, move SDK to another location or run SDK manager.exe as administrator.
If one choose the latter option:
Go to \sdk\tools folder, find and run android.bat, which does everything in the safest way (gathers and sets what it needs and run from temp folder). I even don't think that running just SDK_Manager.exe will work.
Permissions are not the Problem. I had the same problem using Windows 8, and I looked into the .bat files to see whats the problem. "android.bat" uses the xcopy command to copy the libraries it uses into the temp folder. But the xcopy command is stored in the System32 folder. Edit android.bat and replace "xcopy" with "C:\Windows\System32\xcopy". That solved it for me, my temp folder did what it was supposed to do, and if I run SDK using the shell, I dont get any errors.
Permission is the problem.
Do this
First Right Click on the Android Sdk Directoory
2.Choose properties
Go To security Tab And click the Edit Button.(you need to be Administrator to do this)
4.Click the Add Button
type "Everyone" in the Enter object Name box And click "Check Names".
Then Click Ok
Now select "everyone" in user names Box And give it Full control in Permissions Box.
Click ok & again Ok to exit.
(: Now you will not need to run SDK Manager as administrator everytime

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