Warning: File /root/.android/repositories.cfg could not be loaded

Description of the issue

When try to Update Android Extra packages it fails with message Warning: File /root/.android/repositories.cfg could not be loaded.

Environment:

version 1.1.4 (the latest)
Elite Machine

Reproducibility

  • _Does a “Rebuild” help? : NO
  • _Does a rebuild without caches help? : NO
  • If you have multiple different build configurations (workflows), does the issue affect all/more than one? : YES
  • _If it’s an issue which happens sporadically, what’s the frequency? : ALL
  • Does upgrading the build Step to the latest version help? : NO
  • When did the issue start? : this morning (7/17)

Linux/Android stack builds

Building locally fails with same error

Other stacks

It can be reproduced with CLI

Build log

I could not add all log , but this is the error part


Root project

No configurations
BUILD SUCCESSFUL in 1m 34s
1 actionable task: 1 executed

  • echo y
  • grep ‘package installed’
  • android update sdk --no-ui --all --filter platform-tools
    Warning: File /root/.android/repositories.cfg could not be loaded.
    | |
    ±–±--------------------------------------------------------------±---------+
    | x | Update Android Extra packages (exit code: 1) | 101 sec |
    ±–±--------------------------------------------------------------±---------+
    | Issue tracker: https://github.com/bitrise-io/steps-script/issues |
    | Source: https://github.com/bitrise-io/steps-script |
    ±–±--------------------------------------------------------------±---------+
1 Like

I resolved it by myself. Build Tool SDK 26.0.2 does not have android update command any longer. I changed to android-sdk-update@1.0.4 and it is working now.

1 Like

Indeed the Android SDK did change - related changelog and suggested solutions

1 Like

And of course thanks for filling out the issue report & sharing your solution! I’m sure it’ll help others too :slight_smile:

Looks like we experienced the same issue as @tomoima525. Also noticed that the “Update Android Extra packages” step (which is essentially just a script) is unavailable. The above link helped us with our solution:

  1. Add the “Install missing Android tools” step
  2. Modify the script to use the sdkmanager command line tool instead of the “android update sdk” tool
    Ex. sdkmanager “extras;google;google_play_services” “extras;google;m2repository”
2 Likes

Thanks for sharing @denesh!

Just a note: if you have the Install missing Android tools step you don’t need the Script step, the step should be able to install those packages automatically, if required.

1 Like