Android SDK missing

Hi,

I’m trying to build an APK from a test project InsecureBankv2 (https://github.com/hdiv/insecure-bank) from a Gitlab CI Pipeline. I created a .gitlab-ci.yml script from tutorials on the web:

image: jangrewe/gitlab-ci-android

stages:

  • build

before_script:

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

cache:
key: ${CI_PROJECT_ID}
paths:
- .gradle/

build:
stage: build
script:
- echo “start build apk”
- ./gradlew assembleDebug
- echo “executed assembleDebug”
artifacts:
paths:
- 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 local.properties 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 rootProject.name=“InsecureBankv2” should solve the problem, but does not do it. How could I solve also this problem?

Thanks