diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 26060246732413abe207e7c882f8e1b51173bd70..7aa729903123e0cbc550b44890c5a8809922f4dc 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -6,7 +6,12 @@ cache:
     - .gradle/caches
 
 before_script:
+  - set -e
   - export GRADLE_USER_HOME=$PWD/.gradle
+  # 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'
+  # Download OpenJDK 6 so we can compile against its standard library
   - JDK_FILE=openjdk-6-jre-headless_6b38-1.13.10-1~deb7u1_amd64.deb
   - if [ ! -d openjdk ]
   - then