diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 7aa729903123e0cbc550b44890c5a8809922f4dc..a4c894a92c43fe8362586d4320d486bfb9b601fb 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -8,6 +8,8 @@ cache:
 before_script:
   - set -e
   - export GRADLE_USER_HOME=$PWD/.gradle
+  # Accept the license for the Android build tools
+  - echo y | /opt/android-sdk/tools/bin/sdkmanager "build-tools;26.0.2"
   # Install the Android support repository
   # TODO: Remove this when we upgrade the support library
   - echo y | /opt/android-sdk/tools/bin/sdkmanager 'extras;android;m2repository'