Where is Android Home For Docker image: circleci/android:api-28-node8-alpha

Hello All,

I have a failing Circleci build https://circleci.com/gh/rakeshgirase/CloudBuild/48 because of Android_Home is not set. I went through most of the blogs which talks about setting ANDROID_HOME as /usr/local/android-sdk-linux. I too have set it as /usr/local/android-sdk-linux but that doesnt exist when I run the build and you can see the result of the comman "ls -lrt /usr/local/ ". I am new to circleci. Can someone please guide me what to do for this? I need android sdk, node and jdk all together as I am running this build for Nativescript application.


Please add your config.yml here using the formatting tools available, so readers can see what you have so far? There’s some volunteers (fellow users) here, and they won’t do it for you, but they will make suggestions based on your current state.

(Don’t forget you can install things yourself, using apt-get, apk etc).

Hi @halfer

Thank you for your response. I am away from my system so cant paste formatted config.yml but sharing the link below of my config. Yml file https://github.com/rakeshgirase/CloudBuild/blob/master/.circleci/config.yml.

Thanks again


Following is my config.yml file:

#  Javascript Node CircleCI 2.0 configuration file
# Check https://circleci.com/docs/2.0/language-javascript/ for more details
version: 2
      # specify the version you desire here
      #- image: circleci/openjdk:8u181-jdk-node-browsers
      - image: circleci/android:api-28-node8-alpha

      #- image: circleci/android:api-25-alpha
      # Specify service dependencies here if necessary
      # CircleCI maintains a library of pre-built images
      # documented at https://circleci.com/docs/2.0/circleci-images/
      # - image: circleci/mongo:3.4.4

      JAVA_HOME: /usr/lib/jvm/java-8-openjdk-amd64
      ANDROID_HOME: /usr/local/android-sdk-linux
      #ANDROID_HOME: /usr/lib/google-cloud-sdk
      JVM_OPTS: -Xmx3200m

    working_directory: ~/repo

      - checkout

      # Download and cache dependencies
      - restore_cache:
          - v1-dependencies-{{ checksum "package.json" }}
          # fallback to using the latest cache if no exact match is found
          - v1-dependencies-

      - run: npm install

      - save_cache:
            - node_modules
          key: v1-dependencies-{{ checksum "package.json" }}

      - run: sdkmanager
      - run: bash ./.circleci/download.sh
      - run: ls -lrt /usr/local/
      - run: npm install six
      - run: npm install nativescript-cloud
      - run: sudo npm install nativescript -g --unsafe-perm
      #- run: npm install
      - run: echo yes | tns setup
      - run: echo yes | tns cloud setup
      - run: echo yes | tns doctor
      - run: echo -n $'\031' | tns build android --env.snapshot --env.uglify --release --key-store-path $KEYSTORE --key-store-password $KEYSTORE_PASSWORD --key-store-alias sasquiz --key-store-alias-password $KEYSTORE_PASSWORD --copy-to base.apk

Thank you for your reply @halfer. The format seems ok as CircleCi is able to parse the file correctly and run the job but not sure why it is not able to find android_home even when I have included a docker image. I have again formatted the yaml file so that it looks better:)

1 Like

I do not do Nativescript, so I may be missing some info, but if you are using circleci’s Android docker image, Android_home is already set.

This is what I see from my config.yml.


You can take a look at the Docker file (line 121)

1 Like

Yeah @Mayu You are right. It is already set. Now it seems something to do with Nativescript. I will check with the Nativescrtipt team.

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