Stuck at ".android/repositories.cfg could not be loaded."

158,099

Solution 1

Create the file! try:

mkdir -p .android && touch ~/.android/repositories.cfg

Solution 2

Actually, after waiting some time it eventually goes beyond that step. Even with --verbose, you won't have any information that it computes anything, but it does.

Patience is the key :)

PS : For anyone that cancelled at that step, if you try to reinstall the android-sdk package, it will complain that Error: No such file or directory - /usr/local/share/android-sdk. You can just touch /usr/local/share/android-sdk to get rid of that error and go on with the reinstall.

Solution 3

This happened on Windows 10 as well. I resolved it by creating an empty repositories.cfg file.

Solution 4

For Windows 7 and above go to C:\Users\USERNAME\.android folder and follow below steps:

  1. Right click > create a new txt file with name repositories.txt
  2. Open the file and go to File > Save As.. > select Save as type: All Files
  3. Rename repositories.txt to repositories.cfg

Solution 5

Creating a dummy blank repositories.cfg works on Windows 7 as well. After waiting for a couple of minutes the installation finishes and you get the message on your cmd window -- done

Share:
158,099

Related videos on Youtube

ishandutta2007
Author by

ishandutta2007

Former Amazon, Former Microsoft Engineer For details, https://www.linkedin.com/in/ishandutta2007/

Updated on July 05, 2022

Comments

  • ishandutta2007
    ishandutta2007 almost 2 years
     brew cask install android-sdk
    

    ==> Caveats We will install android-sdk-tools, platform-tools, and build-tools for you. You can control android sdk packages via the sdkmanager command. You may want to add to your profile: 'export ANDROID_HOME=/usr/local/share/android-sdk'

    This operation may take up to 10 minutes depending on your internet connection. Please, be patient.

    ==> Downloading https://dl.google.com/android/repository/tools_r25.2.3-macosx.zip Already downloaded: /Users/ishandutta2007/Library/Caches/Homebrew/Cask/android-sdk--25.2.3.zip ==> Verifying checksum for Cask android-sdk ==> Warning: File /Users/ishandutta2007/.android/repositories.cfg could not be loaded.

    • jww
      jww over 5 years
      ANDROID_HOME is the wrong variable. The home variable should be something like export ANDROID_HOME=$HOME/.android. It is where things like a developer's keys are stored. Based on the SDK and path, I believe they mean export ANDROID_SDK_ROOT=/usr/local/share/android-sdk
    • Gayan
      Gayan over 3 years
      repositories.cfg could not be loaded warning can be ignored safely.
  • anthonymonori
    anthonymonori over 6 years
    Sometimes you also have to create the directory first
  • Juan De la Cruz
    Juan De la Cruz about 5 years
    To anyone wondering, you can create a file easily from powershell by typing: New-Item -Type File <filename-with-path>
  • Al-Mothafar
    Al-Mothafar over 4 years
    like what @captainserious said, I used mkdir -p /root/.android && touch /root/.android/repositories.cfg to make it works.
  • Jaroslav Záruba
    Jaroslav Záruba over 4 years
    or you can type "copy con repositories.cfg" and then press Ctrl+Z
  • shawty
    shawty about 3 years
    I just tried that as I have the same issue on WIn10, and when I tried running again I got a new error: "Failed to read or create install properties file"