Solved! reason: File not found when installing Android SDK and NDK

Because this took such a ridiculous amount of time to solve, and because so many people seemed to have encountered it, I figured it would be good to document the error I got, the steps I took to resolve it, and finally what the solution was. First of all the error itself during the install:

Failed to fetch URL
https://dl-ssl.google.com/android/repository/addons_list-2.xml,
reason: File not found

Failed to fetch URL
https://dl-ssl.google.com/android/repository/repository-10.xml,
reason: File not found

If you search for these or variants of these errors with Android search terms you will find a LOT of questions and many similar answers. None of them worked for me, thought I could see how they would be a problem. In my case I was installing on a Windows VM running VMWare Fusion on a Macbook. Here is the log of what I tried, based on suggestions from a variety of sources, StackOverflow high among them:

Ran as administrator
verified no proxy setup
verified can run on this same computer’s mac osx install and load (confirmed no external firewall issues since this is working
tried the check https box
set permissions to folder as myself
set temp folder to folder on drive instead of \\vmware-host\….
set ndk folder to folder on drive instead of \\vmware-host\…

opened windows firewall to c:\windows\system32\java.exe
opened windows firewall to c:\program files (86)\Java\jre7\bin\java.exe
and the same for 64 bit under \program files\
set java_home to 32 bit version of java
added java runtime flags “-Djava.net.preferIPv4Stack=true”

tried bridged mode instead of NAT networking in vm-ware
tried the with my vpn on and off
tried rebooting just the vm
tried rebooting the mac

None of these things made any difference at all. However the early steps about the location of the temp folder and ndk folder were the best clue. The real issue is that java HAAATES spaces in file names and can’t deal with UNC paths, even those in this case mapped with a drive letter.

The answer was….
set the environment variable ANDROID_SDK_HOME to a location on a local drive instead of a UNC path.

Advertisements

Comments are closed.