So I upgraded my config from android-25(which worked good) to android-26:
dependencies:
pre:
- ( sleep 5 && while [ 1 ]; do sleep 1; echo y; done ) | android update sdk --no-ui --all --filter "tools,android-26,build-tools-26.0.0,platform-tools,android-26,extra-google-m2repository,extra-android-m2repository,extra-android-support,extra-google-google_play_services"
With this config I receive following build problem:
File /home/ubuntu/.android/repositories.cfg could not be loaded.
Checking the license for package SDK Patch Applier v4 in /usr/local/android-sdk-linux/licenses
Warning: License for package SDK Patch Applier v4 not accepted.
Checking the license for package Google Repository in /usr/local/android-sdk-linux/licenses
Warning: License for package Google Repository not accepted.
FAILURE: Build failed with an exception.