Android SDK install - repositories.cfg could not be loaded

I just went to build an app, but my Build Tools is out of date (26.0.3), and I received a very helpful message to that effect. So I went to Tools > Settings as suggested, to the Android SDK tab, but when I click on Install Packages, the .bat that runs just ends with this message at the end of each section (after parsing various package.xml files):

Warning: File C:\Users\jeff_\.android\repositories.cfg could not be loaded.
done

In fact, that file doesn’t exist on my machine, and I don’t even remember reference to that folder in the past. My JDK is a little out of date (C:\Program Files\Java\jdk1.8.0_152), but that doesn’t seem like it should give this error.

I could try installing the SDK and JDK from scratch, but it seems like SAB should be able to perform the update. Any suggestions?

My repositories.cfg file in a similar path is just three lines:

### User Sources for Android SDK Manager
#Wed Mar 14 22:55:42 ICT 2018
count=0

I renamed that file and got a similar Waring message. So I’d try adding that file first.

But there are other files and sub folders in that folder too. Do you have other files?

Mine has these files:
.android-file-list.txt
.emu-update-last-check
adbkey
adbkey.pub
adb_usb.ini
analytics.settings
androidtool.cfg
androidwin.cfg
build-cache.lock
ddms.cfg
debug.keystore
debug.keystore.lock
default.keyset
emu-update-last-check.ini
modem-nv-ram-5554
modem-nv-ram-5556
modem-nv-ram-5584
repositories.cfg
sites-settings.cfg

And these folders
avd
breakpad
build-cache
cache
studio

If you are missing the whole folder then reinstall Android SDK.

Ian

I don’t think the <repositories.cfg> file was the issue at all. When I tried creating it, it didn’t give me the warning, but it also didn’t help to get my SDK packages up-to-date either.

In the end, I downloaded and re-installed the entire SDK from scratch, which with the dicey Internet in Chad took a fair amount of time and frustration. I downloaded the sdk-tools (152Mb) and created the c:\sdk folder, then ran Install Packages from within SAB to get the additional packages (several hundred more Mb). Those downloads failed several times, but I just kept running the Install until it succeeded. And now I can built apps again.

My old C:\sdk folder was 656Mb. My newly installed c:\sdk folder is 414Mb. It is smaller because it doesn’t have some of the older folder versions, like it only has the 27.0.3 folder in build-tools, and not the older 25.0.3 and 26.0.3.

So I don’t know why SAB couldn’t update the SDK packages. It is nice in some ways to have a “fresh” SDK folder, without the unnecessary old stuff, especially since I do sometimes help people install app builders by copying my SDK folder. But it was also a fairly painful process. So what happened? I don’t think I had built an app in a few months - did it get too far out-of-sync, and couldn’t bring the SDK packages up-to-date?

Glad the reinstall worked. Hard when the internet is poor.

Something got out of wack to cause the problem. At least one file was missing probably more.