Gradlew unable to assemble in my local runner

  LANG: "en_US.UTF-8"
  ANDROID_SDK_TOOLS: "9477386"

stage: build
  image: openjdk:11-jdk
    - apt-get --quiet update --yes
    - apt-get --quiet install --yes wget unzip curl
    - curl -sL | bash -
    - apt-get install -y nodejs
    - export ANDROID_SDK_ROOT="${PWD}/android-home"
    - install -d $ANDROID_SDK_ROOT
    - wget --output-document=$ANDROID_SDK_ROOT/${ANDROID_SDK_TOOLS}
    - pushd $ANDROID_SDK_ROOT
    - unzip -d cmdline-tools
    - pushd cmdline-tools
    - mv cmdline-tools tools || true
    - popd
    - popd
    - export PATH=$PATH:${ANDROID_SDK_ROOT}/cmdline-tools/tools/bin/
    - yes | sdkmanager --licenses || true
    - sdkmanager "platforms;android-${ANDROID_COMPILE_SDK}"
    - sdkmanager "platform-tools"
    - sdkmanager "build-tools;${ANDROID_BUILD_TOOLS}"
    - npm i @react-native-community/cli-platform-android
    - cd android
    - curl --silent "" | bash
    - ls
    - ./gradlew --stop
    - ./gradlew clean assembleDebug

Problem to solve

Describe your question in as much detail as possible:

I am new to gitlab and my pipeline kept failing at

  • ./gradlew clean assembleDebug

My pipeline is running on my local runner and my SDK version is 33 but it kept showing me

Could not determine the dependencies of task ‘:app:compileDebugJavaWithJavac’.
Could not determine the dependencies of null.
Failed to install the following SDK components: build-tools;30.0.3 Android SDK Build-Tools 30.0.3

How do I fix the issue? I am new and I do not understand the issue. Hope someone can help. Thank you!


Add the CI/CD configuration from .gitlab-ci.yml and other configuration if relevant (e.g. docker-compose.yml). Alternatively, create a public example project that provides all necessary files to reproduce the question.


Please select whether options apply, and add the version information.

  • Self-managed
  • SaaS
  • Self-hosted Runners


Thanks for taking the time to be thorough in your request, it really helps! :blush: