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

**URL:** <https://discuss.bitrise.io/t/warning-file-root-android-repositories-cfg-could-not-be-loaded/2295>\
**Category:** Builds\
**Created:** [July 18, 2017, 12:10am UTC](https://discuss.bitrise.io/t/warning-file-root-android-repositories-cfg-could-not-be-loaded/2295 "2017-07-18T00:10:47Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![tomoima525](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.bitrise.io/tomoima525/32/702_2.png) [@tomoima525](https://discuss.bitrise.io/u/tomoima525)\
**Post date:** [July 18, 2017, 12:10am UTC](https://discuss.bitrise.io/t/warning-file-root-android-repositories-cfg-could-not-be-loaded/2295/1 "2017-07-18T00:10:47Z")

</div>

## 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](https://github.com/bitrise-io/steps-script/issues) |  
| Source: [https://github.com/bitrise-io/steps-script](https://github.com/bitrise-io/steps-script) |  
±–±--------------------------------------------------------------±---------+

---

<div class="post-metadata">

**Author:** ![tomoima525](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.bitrise.io/tomoima525/32/702_2.png) [@tomoima525](https://discuss.bitrise.io/u/tomoima525)\
**Post date:** [July 18, 2017, 1:14am UTC](https://discuss.bitrise.io/t/warning-file-root-android-repositories-cfg-could-not-be-loaded/2295/2 "2017-07-18T01:14:12Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![viktorbenei](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.bitrise.io/viktorbenei/32/18_2.png) [@viktorbenei](https://discuss.bitrise.io/u/viktorbenei)\
**Post date:** [July 18, 2017, 7:45am UTC](https://discuss.bitrise.io/t/warning-file-root-android-repositories-cfg-could-not-be-loaded/2295/3 "2017-07-18T07:45:32Z")

</div>

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

> [@Weekly Virtual Machine / Stack updates - 2017.07.15](http://discuss.bitrise.io/t/weekly-virtual-machine-stack-updates-2017-07-15/2271/4):
>
> Android SDK update note: the previous android sdk update ... command is no longer available in the latest Android SDK. If you install packages manually with android sdk update please change them to sdkmanager PACKAGE. E.g. instead of: echo y | android update sdk --no-ui --all --filter build-tools-24.0.1 | grep 'package installed' use: sdkmanager "build-tools;24.0.1" That said, if you can, please use the the [Install Missing Android Tools](http://discuss.bitrise.io/t/android-automatic-dependency-installer-e-g-build-tools-step-install-missing-android-tools/316) step instead, that should be able to detect and insta…

---

<div class="post-metadata">

**Author:** ![viktorbenei](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.bitrise.io/viktorbenei/32/18_2.png) [@viktorbenei](https://discuss.bitrise.io/u/viktorbenei)\
**Post date:** [July 18, 2017, 9:20am UTC](https://discuss.bitrise.io/t/warning-file-root-android-repositories-cfg-could-not-be-loaded/2295/4 "2017-07-18T09:20:43Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![denesh](https://avatars.discourse-cdn.com/v4/letter/d/bc79bd/32.png) [@denesh](https://discuss.bitrise.io/u/denesh)\
**Post date:** [July 18, 2017, 3:49pm UTC](https://discuss.bitrise.io/t/warning-file-root-android-repositories-cfg-could-not-be-loaded/2295/5 "2017-07-18T15:49:49Z")

</div>

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](https://developer.android.com/studio/command-line/sdkmanager.html) command line tool instead of the “android update sdk” tool  
Ex. sdkmanager “extras;google;google\_play\_services” “extras;google;m2repository”

---

<div class="post-metadata">

**Author:** ![viktorbenei](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.bitrise.io/viktorbenei/32/18_2.png) [@viktorbenei](https://discuss.bitrise.io/u/viktorbenei)\
**Post date:** [July 18, 2017, 3:50pm UTC](https://discuss.bitrise.io/t/warning-file-root-android-repositories-cfg-could-not-be-loaded/2295/6 "2017-07-18T15:50:55Z")

</div>

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.
