views:

823

answers:

3

I'm trying to update and install the latest Android SDK (API 8) and keep getting the following error:

Failed to fetch URL https://dl-ssl.google.com/android/repository/repository.xml, reason: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target

I'm running on OS X 10.6.3 If I visit the url in a browser I'm not getting any errors about an untrusted cert.

edit: I'm running Revision 5 of the Android SDK and AVD manager (if that makes a difference) edit: Tried downloading the latest android sdk (revision 6) and running everything from the command line and still no dice. I can only assume there's something either in my java installation or in os x on my machine.

+7  A: 

Try go to settings inside /tools/android and uncheck the "force https..."

OTisler
I'm not sure I follow. I don't see a settings tab/menu when I run the "Android SDK and AVD manager" whether I start it up from the command line or from with in eclipse.I've tried manually adding a site (http://dl.google.com/android/repository/repository.xml thinking this is the unsecured version?). And now I'm getting this error:Package DescriptionAndroid + Google APIs, API 8, revision 1Requires SDK Platform Android API 8DependenciesThis package depends on:- Missing SDK Platform Android, API 8 and then I get this error:
tad604
Hmm, yeah, I guess you can't get to settings from the eclipse "Android SDK and AVD manager" Go to where you installed android on your mac. For me, I put it in my applications folder. Inside the android folder, you will see a "tools" folder, and in that folder, an "android" application. Funnily enough, its also named "Android SDK and AVD manager". THERE I see a settings tab on the left; and the "Force https" thing is over there
OTisler
Ok, I'm blind. I found the settings menu and unchecked force https this doesn't seem to make a difference.
tad604
This worked for me. I tried adding the non HTTPS version of the URL manually to the SDK manager in Eclipse but it only showed me the Google API packages in the list. When I ran SDK Setup.exe from the SDK folder and changed the setting to "force https..." it showed me everything and I was able to download the platform, docs etc. Thanks for your help, you saved my day!
Bryan Bedard
+2  A: 

Ok this worked for me so far (although it makes me nervous that I'll have future problems) I downloaded the bundles straight from the site: http://dl.google.com/android/repository/google_apis-8_r01.zip http://dl.google.com/android/repository/android-2.2_r01-macosx.zip

unzipped them and put the first one under the add-ons folder (where I had installed the android sdk ../android-sdk-mac_86/add-ons/google_apis-8_r01) unzipped the second one and created the directory android-8 underneath ../android-sdk-mac_86/platforms Taking the contents of the zip file and moving it into that directory (the first zip created an appropriately named directory, this one did not).

Now it shows up as installed. Still wish I understood what the root problem is/was as I can't update any installed packages with out coming across the same initial error.

tad604
A: 

I know you are using a mac, but for anyone who is on Windows and is getting this error then try going to the SDK and AVD Manager via eclipse instead of using the SDK Setup.exe. This can be found under Window > Android SDK and AVD Manager

This fixed the problem for me.

aembleton