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.

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.

  • 2
    For Powershell on Windows 10: New-Item C:\Users\username\.android\repositories.cfg -type file
    – smilebomb
    Oct 19 '17 at 22:46
  • I think it relates to where the sdkmanager looks for getting files.
    – Masked Man
    Nov 27 '17 at 9:34
  • Shorter command for Windows: New-Item ~\.android\repositories.cfg -Force Jul 18 '19 at 21:56

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

I got the same message in Windows 10 when installing Flutter. Not sure if it's the same as Ubuntu, but flutter doctor suggested the following fix which worked like a charm:

run: flutter doctor --android-licenses

This lead to a message that "7 of 7 SDK package licenses not accepted" and it asked if I wanted to view the licenses (y/N)? I typed 'y'.

Now it showed me all the licenses, and gave me the options to accept them (y/N). So I typed y to all of them.

Problem solved! :)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.