Android SDK - repositories.cfg could not be loaded

To set up a minimal SDK installation without Android Studio, here's what I did:

mkdir ~/sdk
cd ~/sdk
wget https://dl.google.com/android/repository/tools_r25.2.5-linux.zip
unzip tools_r25.2.5-linux.zip

After successfully unpacking the zip file, I'm having a problem while updating:

tools/bin/sdkmanager --update

I get the following:

Warning: File /home/xxxx/.android/repositories.cfg could not be loaded.
done

I was hoping to get some assistance with this. Thank you.


I've done the same thing on my Windows 7 dev box and getting the exact same error. I'm thinking it's an issue with the current android dev toolchain - not an OS issue.

I just created an empty text file with that name in the directory listed and the error went away. As the sdkmanager still has access to the repositories seemingly without issue I'm assuming it's an optional file for adding new repos??? your guess is as good as mine!

It's been a while since I've ubuntu'd but I think you can resolve it the same way simply with;

touch ~/.android/repositories.cfg

shouldn't need sudo.


Create the file ~/.android/repositories.cfg

touch ~/.android/repositories.cfg

Then add the following lines of text in that file, for example by opening it with a text editor gedit ~/.android/repositories.cfg and typing these lines, then saving the file.

### User Sources for Android SDK Manager
#Fri Nov 03 10:11:27 CET 2017 count=0

After that you can use these commands

./Android/Sdk/tools/bin/sdkmanager --update
./Android/Sdk/tools/bin/sdkmanager --licenses