Frequent Android issues

Could not find an android package or you have not accepted the license agreements⚓

> A problem occurred configuring project ':lib'.
> You have not accepted the license agreements of the following SDK components:
[Google 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

Please use the Install missing Android tools step. The section below is kept only for referencing purposes!

The error means that your build requires an Android package which is either not (yet) preinstalled
(you can see which packages are preinstalled here, on GitHub -
feel free to send us a Pull Request if you'd want to add a new preinstalled package!),
or outdated.

The solution is quite simple, you just have to install/update the related package(s).
To do that add a Script step to your workflow -
should be before the step where you get the error, it can be the very first step in the workflow -
with the following content:

Please use the Install missing Android tools step. The section below is kept only for referencing purposes!

An alternative solution for the You have not accepted the license agreements of the following SDK components
error, as printed in the log:

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

If you have accepted the license agreements on one workstation, but wish to build your projects on a different one,
you can export your licenses by copying the accepted licenses folder from the Android Sdk Home
folder (this should be located at <android sdk home path>/licenses) of your current workstation,
to the Android Sdk Home directory of the machine where you now want to build your projects.

Create an android-licenses directory in the root directory of your git repository,
and copy the license files into this directory,
then in your Workflow copy the licenses to the right location using a Script step.

Add the Script step right after the Git Clone step (that's when your code is available
on the build virtual machine), with the content: