Build Problem With The Android Build CircleCI 2.0

Hi,

I use the latest circleci 2.0 version with the following sample build yaml file.

version: 2
jobs:
  build:
    working_directory: ~/code
    docker:
      - image: circleci/android:api-27-alpha
    environment:
      JVM_OPTS: -Xmx3200m
    steps:
      - checkout
      - restore_cache:
          key: jars-{{ checksum "build.gradle" }}-{{ checksum "app/build.gradle" }}
      - run:
          name: Download Dependencies
          command: ./gradlew androidDependencies
      - save_cache:
          paths:
            - ~/.gradle
          key: jars-{{ checksum "build.gradle" }}-{{ checksum  "app/build.gradle" }}
      - run:
          name: Build Debug
          command: ./gradlew assembleDebug
      - store_artifacts:
          path: app/build/outputs/apk/debug/app-debug.apk
          destination: app-debug.apk

once i use this, i still get the following issue with the sdk tool licenses

File /home/ubuntu/.android/repositories.cfg could not be loaded.
Checking the license for package Android SDK Build-Tools 27.0.3 in /usr/local/android-sdk-linux/licenses
Warning: License for package Android SDK Build-Tools 27.0.3 not accepted.
Checking the license for package Android SDK Platform 27 in /usr/local/android-sdk-linux/licenses
Warning: License for package Android SDK Platform 27 not accepted.
Project evaluation failed including an error in afterEvaluate {}. Run with --stacktrace for details of the afterEvaluate {} error.

As far as i see on Circle CI 2.0 it should not be the issue anymore but i don’t know the real reason behind.

1 Like

Thanks for the edit. This error has come up several times - any of these threads any good?

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