@ Stanislav, you were partly right. I managed to find out the problem and, of course, as expected, it was right before my eyes. So, as we all know, the runner / s on GitLab CI is all โemptyโ. This means that nothing is installed on them. That is why we have .gitlab-ci.yml . Now, looking back at my .gitlab-ci.yml , I am telling the runner to get jdk7 and gradle , but I am missing the Android SDK , so I got an error:
Error: Could not find or load main class org.gradle.wrapper.GradleWrapperMain
So my new .gitlab-ci.yml looks like this and it compiles as it should:
before_script: - apt-get --quiet update --yes - apt-get --quiet install --yes wget tar unzip openjdk-7-jdk lib32stdc++6 lib32z1 - wget --quiet --output-document=android-sdk.tgz https://dl.google.com/android/android-sdk_r24.4.1-linux.tgz - tar --extract --gzip --file=android-sdk.tgz - echo y | android-sdk-linux/tools/android --silent update sdk -a -u -t 1,2,3,4,5,6,29,31,32,33,34,45,138,142,145,146,147,148,149,150,151 - wget --quiet --output-document=gradle.zip https://services.gradle.org/distributions/gradle-2.12-bin.zip - unzip -q gradle.zip - export ANDROID_HOME=$PWD/android-sdk-linux build: script: - gradle-2.12/bin/gradle assembleDebug artifacts: paths: - app/build/outputs/apk/app-release-unsigned.apk
source share