Sonarqube running on older gradle version in gitlab

use gradle wrapper so you mean like use in cache path like this?

sonarqube-check:
  tags:
    - runner
  image: jangrewe/gitlab-ci-android
  variables:
    SONAR_USER_HOME: "${CI_PROJECT_DIR}/.sonar"  # Defines the location of the analysis task cache
    GIT_DEPTH: "0"  # Tells git to fetch all the branches of the project, required by the analysis task
  cache:
    key: "${CI_JOB_NAME}"
    paths:
      - .gradle/wrapper
      - .gradle/caches
      - .sonar/cache
  before_script:
    - export GRADLE_USER_HOME=$(pwd)/.gradle
    - chmod +x ./gradlew
  script:
    - sh gradlew sonarqube
  allow_failure: true
  when: manual
  only:
    - dev_mitesh # or the name of your main branch

@Margarita_Nedzelska thank you for your response as per this i added jangrewe/gitlab-ci-android
and now i am not getting any sdk error but i am getting something like this

* What went wrong:
Execution failed for task ':app:sonarqube'.
> File src/test/java/com/example/sonarqube/ExampleUnitTest.kt can't be indexed twice. Please check that inclusion/exclusion patterns produce disjoint sets for main and test files