Hi guys, i’ve faced this issue with build
What went wrong:
A problem occurred configuring project ‘:app’.
You have not accepted the license agreements of the following SDK components:
[Solver for ConstraintLayout 1.0.0-beta4, ConstraintLayout for Android 1.0.0-beta4].
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.
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 from your Mac/PC.
Then in your Workflow on bitrise.io 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:
#!/bin/bash
# fail if any commands fails
set -e
# debug log
set -x
mkdir -p "$ANDROID_HOME/licenses"
rsync -avhP ./android-licenses/ "$ANDROID_HOME/licenses/"
That’s all, this script copies the licenses from the android-licenses (from your repository) into the system’s Android SDK Home path under licenses directory.
then using the ZIP resource archive downloader step you can download and uncompress it into $ANDROID_HOME/ (specify this as the Extract path option of the step) - Note: the path ($ANDROID_HOME) depends on which program you used to create the ZIP! If you use Mac OS built in Finder -> Compress tool the generated ZIP will include the “licenses” directory in the ZIP, so you shouldn’t include it in the path when you extract it. If you use another tool you might have to include licenses in the path ($ANDROID_HOME/licenses), depending on whether your ZIP itself includes it or not.
Use a Script step and just echo into the files.
The license files are simple text/hash files, with a content like 8933bad161af4178b1185d1a37fbf41ea5269c55, so you can also do something like this with a Script step:
You’re absolutely right @DeveloperExozet - thanks for sharing, I’ll update the licenses script ASAP!
Just one note - we just accepted a Pull Request which will include the 8933bad161af4178b1185d1a37fbf41ea5269c55 license by default in the default docker image, as well as a couple of preinstalled constrant-layout packages (after this weekend’s updates) - https://github.com/bitrise-docker/android/pull/68 - that should help in most cases.