Jitpack: Failed to install the following Android SDK packages as some licences have not been accepted

You have probably ran into: https://issuetracker.google.com/issues/123054726

As a workaround I installed it individually. i.e.

$ yes | $ANDROID_HOME/tools/bin/sdkmanager "platforms;android-27"
$ yes | $ANDROID_HOME/tools/bin/sdkmanager "build-tools;27.0.3"

I had the same problem, uhh spend a few hours until finally found a solution

In short:

1) Create a private gist android-sdk-license.sh with this content:

#!/bin/bash

set -ex

cd $ANDROID_HOME
mkdir -p licenses

cat << EOF >> licenses/android-sdk-license
8933bad161af4178b1185d1a37fbf41ea5269c55
d56f5187479451eabf01fb78af6dfcb131a6481e
24333f8a63b6825ea9c5514f83c2829b004d1fee
EOF

2) Get a raw link to this file
3) Create jitpack.yml in the root of your project with this content:

#!/bin/bash

before_install:
- curl PASTE_RAW_LINK_TO_GIST | sh

4) Commit & push

Hope this helps