Cannot finish a react native build ANDROID_SDK_ROOT missing

Hi there, could someone help me figure out how to set this variable ANDROID_SDK_ROOT so I can succeed my build?

Edit I know where to add environment variables, so I need to know where Semaphore installs the JVM binaries in order to set the value of ANDROID_SDK_ROOT correctly so the build with gradle can finish with success building this React Native project…

I can provide more details,
the important part of the error is:

* What went wrong:01:07

371Could not determine the dependencies of task ':app:bundleReleaseResources'.01:07

372> SDK location not found. Define location with an ANDROID_SDK_ROOT environment variable or by setting the sdk.dir path in your project's local properties file at '/home/semaphore/nsc-total-app/android/local.properties'.

here is the full error log: https://pastebin.com/pndvn0wJ
and here is my workflow (the only one I have setup)

version: v1.0
name: First pipeline
agent:
  machine:
    type: e1-standard-2
    os_image: ubuntu1804
blocks:
  - name: bundle android
    task:
      prologue:
        commands:
          - sem-version node 10.13.0
          - checkout
          - cache restore
          - yarn
          - cache store
      jobs:
        - name: bundle-android
          commands:
            - yarn bundle-android

Hello,

You can set environment variables in your pipeline with these steps : https://docs.semaphoreci.com/guided-tour/environment-variables-and-secrets/

Hi @Hessu1337 thanks for the reply.
Yes I saw the option to add it, but I do not know where semaphore installs the jvm binaries
I need to know now what is the correct value for the variable ANDROID_SDK_ROOT, should have made the question more clear about that…

According to the support staff I talked to, the correct way to structure the yml file for what I’m trying to achieve is to remove the os_image and add a container on its place, same line of the yml file, with the android:29-node image like below

also, make sure to add npm install -g yarn of your project uses it just like mine…

version: v1.0
name: First pipeline
agent:
  machine:
    type: e1-standard-2
  containers:
    - name: main
      image: 'registry.semaphoreci.com/android:29-node'
blocks:
  - name: bundle android
    task:
      prologue:
        commands:
          - sem-version node 10.13.0
          - npm install -g yarn
          - checkout
          - cache restore
          - yarn
          - cache store
      jobs:
        - name: bundle-android
          commands:
            - yarn bundle-android
      env_vars:
        - name: ANDROID_SDK_ROOT
          value: /opt/android-sdk-linux