Android SDK missing


I’m trying to build an APK from a test project InsecureBankv2 ( from a Gitlab CI Pipeline. I created a .gitlab-ci.yml script from tutorials on the web:

image: jangrewe/gitlab-ci-android


  • build


  • export GRADLE_USER_HOME=$(pwd)/.gradle
  • chmod +x ./gradlew

- .gradle/

stage: build
- echo “start build apk”
- ./gradlew assembleDebug
- echo “executed assembleDebug”
- app/build/outputs/

Such a script makes use of a docker image, which already includes Android SDK. Build works fine until the error point when it requires Android SDK:

SDK location not found. Define location with sdk.dir in the file or with an ANDROID_HOME environment variable.

I looked inside docker container with debug messages and could not find “Sdk” folder there. But may be my github-runner user has not enough rights? How could I solve this problem? Or find SDK path? In the docs of this docker image in docker file I see that should be in Sdk folder - appartently in /home/.

Another problem I have is that InsecureBankv2 (root folder for APK project is a sub folder of an actual project, where I start pipeline. Pipeline cannot find gradle files if I do not prepend /InsecurtBankv2 folder in any path. A settings.gradle file in a root folder with a property“InsecureBankv2” should solve the problem, but does not do it. How could I solve also this problem?


This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.