0

Bitbucket pipelines A problem occurred configuring project ':app'. > You have not accepted the license agreements of the following SDK components:

this is my build.sh

#!/bin/sh

# Add Android SDK license in a default file
mkdir -p "{$ANDROID_HOME}/licenses"
echo -e "<My license>" > "{$ANDROID_HOME}/licenses/android-sdk-license"
echo -e "<My license>" > "{$ANDROID_HOME}/licenses/android-sdk-preview-license"

# Build the app
./gradlew assembleProductionRelease

this is my bitbucket-pipelines.yml

image: uber/android-build-environment:latest

pipelines:
  default:
    - step:
        script:
          - unset ANDROID_NDK_HOME
          - echo “Start default step”
          - bash ./build.sh
          - echo "Amazing"

PS:im using bitbucket pipeline, ur link is using local android sdk.

What am I missing?

david
  • 2,900
  • 5
  • 28
  • 48

1 Answers1

0

This might be related with stale CI image, which does not accept licenses by default. Or downloads latest SDK dependencies without accepting them.

Please try using: image: androidsdk/android-30: Bitbucker blog post

There is also a manual way to make it, however the image itself should provide working environment: manual way

Michał Dobi Dobrzański
  • 1,449
  • 1
  • 20
  • 19