Licenses missing

I get this message

Checking the license for package Android SDK Platform 25 in /opt/android/sdk/licenses
License for package Android SDK Platform 25 accepted.
Preparing “Install Android SDK Platform 25 (revision: 3)”.
“Install Android SDK Platform 25 (revision: 3)” ready.
Finishing “Install Android SDK Platform 25 (revision: 3)”
Installing Android SDK Platform 25 in /opt/android/sdk/platforms/android-25
“Install Android SDK Platform 25 (revision: 3)” complete.
“Install Android SDK Platform 25 (revision: 3)” finished.
Checking the license for package Android Support Repository in /opt/android/sdk/licenses
Warning: License for package Android Support Repository not accepted.

FAILURE: Build failed with an exception.

What went wrong:
A problem occurred configuring project ‘:app’.
You have not accepted the license agreements of the following SDK components:
[Android Support Repository].
Before building your project, you need to accept the license agreements and complete the installation of the missing components using the Android Studio SDK Manager.
Alternatively, to learn how to transfer the license agreements from one workstation to another, go to http://d.android.com/r/studio-ui/export-licenses.html

Current config.yml is:

version: 2
jobs:
  build:
    working_directory: ~/TabletopApp/TabletopRoleplayTool
    docker:
      # specify the version you desire here
      - image: circleci/android:api-23-alpha

    environment:
      JVM_OPTS: -Xmx3200m

    steps:
      - checkout:
          path: ~/TabletopApp

      # Download and cache dependencies
      - restore_cache:
          key: jars-{{ checksum "build.gradle" }}-{{ checksum  "app/build.gradle" 

}}

      - run:
          name: chmod permissions
          command: chmod +x ./gradlew

      - run:
          name: Approve license for build tools
          command: (echo y; echo y; echo y; echo y; echo y; echo y) | 

$ANDROID_HOME/tools/bin/sdkmanager --licenses

      - run: 
          name: Download Dependencies
          command: ./gradlew androidDependencies

      - save_cache:
          paths:
            - ~/.gradle
          key: jars-{{ checksum "build.gradle" }}-{{ checksum  "app/build.gradle" 

}}

      # run tests!
      - run: 
          name: Run Tests
          command: ./gradlew lint test

      - store_artifacts:
          path: app/build/reports
          destination: reports

      - store_test_results:
          path: app/build/test-results

fails at “Approve license for build tools”

1 Like

2 posts were merged into an existing topic: Licences for Android build tools not accepted