I spent a lot of Saturday messing around trying to update my Android SDK and kept getting the error SSL Peer Shut Down Incorrectly just as the download seemed to be about to complete
I was using the eclipse AVD and SDK manager to upgrade, and since it wasn’t working I went looking for an alternative.
One idea suggested on Google’s Adding SDK Components page was to cd into the tools directory and run the android command on the command line, but this didn’t work either as it couldn’t find the correct path for the SWT folder:
Starting Android SDK and AVD Manager
SWT folder 'lib\x86_64' does not exist.
Please set ANDROID_SWT to point to the folder containing swt.jar for your platform.
This was rubbish as it did exist, and setting ANDROID_SWT in my environment variables didn’t work either.
Out of sheer desperation, I downloaded the latest SDK tools, deleted my old SDK and installed from scratch.
The latest SDK tools release (revision 3) doesn’t come with any pre-packaged Android platform, but it does come with a new standalone SDK updater: SDK Setup.exe on Windows.
I initially had the same issue with the new update tool, but unlike previous versions this had the option to force the updater to use HTTP instead of HTTPS. Since the problem was with SSL, I forced it to use HTTP and lo’ and behold, it worked perfectly!
Tags: Android, development, tips