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.
Related
While installing android sdk update this error A folder failed to be moved" pops up and even if I disable antivirus nothing happens and same error pop up appears.
This issue is occurring many time when I try to update android sdk , I have seen few answer elsewhere but I answers are present here and there in semi correct form. So let me put method which worked for me
You get this error when you have downloaded all the sdk update and now sdk manager is trying to install it in same folder where sdk manager is placed. Hence sdk manager try to move folder and install update.
Steps to install this downloaded sdk updates
*locate sdk_directory: {directory where android studio is installed }\sdk*
1.Take a backup of the sdk tools folder (sdk_directory\tools) i.e. rename it as tools_backup in case something goes wrong we can revert
back ( see note in case you face any problem while renaming )
2.open the sdk_directory\temp folder.There should be a zip named tools_r23.0.5-windows.zip or similar (may not be exact name choose
highest number folder my case r23).
3.Unzip that. You should end up with a tools folder.
4.Copy all the files from this folder into sdk_directory\tools. Overwrite when asked.
After that, start the SDK-Manager again. The tools version should be updated.
Note: I faced problem while renaming tools folder while making backup because some process was using it. I followed this guide to find and end that process
For Future SDK Updates
Do Not Update From Android Studio or Eclipse
Go to sdk_directory\tools and run android.bat with administrator
privileges .It will start sdk manager and you wont face problem
discribed above
I was facing same issue, just closed android studio and click on 'yes' of retry dialog in sdk manager.
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.
When trying to upgrade Android SDK Tools to revision 16, I am getting the following error:
Failed to rename directory C:\android-sdk-windows\tools to
C:\android-sdk-windows\temp\ToolPackage.old01.
Done. Nothing was installed.
Nothing I try to do, including providing FULL permissions (in addition to the special permissions it already had) to Administrator, helps.
Also, I don't know of anything that is accessing those directories.
How do I fix this problem?
This is how I fixed it in Windows 7:
Make a copy of the \tools folder, name it something like \copy. So you should have c:\android-sdk-windows\copy. Now run android.bat from the \copy folder with Admin privileges. This should prevent the issue with items currently being open in the \tools folder.
For me, it worked by simply deleting the contents of the temp directory in the SDK installation folder (C:\android-sdk-tools\temp in your case)
Had the same issue with that and even tried with the copied folder. I had to run adb kill-server in the command prompt in the platform-tools directory for it to continue.
For me this problem was solved by running SDK Manager with administrator privileges
For me who I tried all the previous solutions and didn't work I solved my problem with the following sugestion (#16) on the link: https://code.google.com/p/android/issues/detail?id=4410
which is:
Find the "temp" folder and you can find the "tools_r05-windows.zip" or other
files which you will update.
unzip it.
here you will find the "tools_r05-windows" and copy all the files in the file.
which should be updated file
copy to the "tools" folder.
OK.
I encounter this problem while adding compatibility package to project in eclipse.
I solved this issue by opening the eclipse with administrator privileges.
In Windows 7:
Right click on eclipse.exe Run as administrator.
To make eclipse.exe to run as administrator always
Right click on eclipse.exe --> Properties -->Compatibility tab
check the Run this program as an administrator check box under Privilege Level
I ran into the same problem.
Most probably, you have a project opened in Eclipse (or android studio), and this project uses files that the SDK manager is trying to access or update.
So, the project is reading from some SDK platform folders/files, and the SDK manager is trying to overwrite it at the same time (for updating).
This is why you do not have permissions, not because you are not administrator.
Try closing Eclipse, click 'YES' in the SDK manager warning message (or re-run SDK manager again while Eclipse is not running).
I close the eclipse and run my android.bat (Path-To-YOUR-Android-SDK/tools/android.bat) from the command line.
It works for me
thanks
For anyone who is having this issue on OS X, sudo chown -R $USER worked for me (on your android-sdk directory).
Press ctrl + shift + esc to launch the task manager. Click on the Processes tab and sort the processes according to the command line column. Now search in the command line column for the same folder that contains /tools, click on it and click on End Process button. This will force all processes that use the same folder to be closed. Now open the SDK Manager again as administrator and it will work.
You can run SDK Manager outside eclipse directly from the androidSDK directory.
In addition to the instructions given here by William, make sure you first delete the temp folder in the sdk folder. If it already exists, sometimes even creating a copy of the tools folder does not work. Therefore:
Delete the sdk\temp folder.
Create a copy of the sdk\tools folder as sdk\copy
Run android.bat which is inside the copy folder, from a command prompt, with admin privileges. This will start the SDK manager
Update the sdk as you normally do when the SDK manager starts.
Delete the sdk\copy folder
i have another solution, that helped me.
1. When you got error message in SDK Manager, copy zip file (name contains version and 'tools' word) from sdk/temp folder;
2. Exit from SDK Manager;
3. Unzip archive from first item, you got new tools, and replace sdk/tools with new one;
4. Clean sdk/temp folder;
Right click on "android-sdk" folder > properties > security > set full control permission for "ALL APPLICATION PACKAGES" and press OK, it take some minutes for sett this permission in all sub directories.
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
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. ;)
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