Builds failing - not accepting license agreements

Checking the license for package Android SDK Build-Tools 25.0.2 in /opt/android-sdk-linux/licenses
Warning: License for package Android SDK Build-Tools 25.0.2 not accepted.
FAILURE: Build failed with an exception.

  • What went wrong:

You have not accepted the license agreements of the following SDK components:
[Android SDK Build-Tools 25.0.2].

Our Android builds started failing 2 days ago. What’s wrong?

Most likely duplicate of Steps-install-missing-android-tools failing - 'You have not accepted the license agreements of the following SDK components:'

Did you try to upgrade the step?

If the step upgrade would not solve it, please include the whole log / build url! :blush:

We’re not using the step upgrade component in our projects. These are the scripts we’re using:

# fail if any commands fails
set -e
# debug log
set -x

rsync -avhP ./android-licenses/ "$ANDROID_HOME/licenses/"


./gradlew dependencies || true

Is there a way we can send you our build log directly? We do not want to post it publicly.

It seems that you have old license hash.
You can either update it (here are the current hashes: or accept all the licenses like that:

yes | sdkmanager --licenses
1 Like

@koral 's right, or use our Install Missing Android Tools step, which does exactly this (installs these dependencies and accepts the license) :wink:

Not completely. Install Missing Android Tools step contains hardcoded license hashes. If Google changes license build will start to fail again until new version of the step is released and users update their workflows (if they are not using alwayst latest version).

OTOH sdkmanager --licenses will accept all the current licenses at the time of invocation, no need to update anything. The only edge case can occur if license is changed in the short time window between “Accept licenses” and compilation (e.g. Gradle Runner) steps.

An update for the step is scheduled for next week to remove the hash based solution @koral :wink:

Tldr the complication was the LTS stack, which has older Android tools and no sdkmanager, so we rolled out a quickfix and scheduled a revision for next week :blush:

1 Like

We were able to resolve this problem by accepting all licenses as follows:


@koral We’re getting this issue now and the build is failed. We’re using node version 12.18 and running in Xcode 11.7.x, on macOS 10.15.6 (Catalina)

Failed to install licenses using $(sdkmanager --licenses) command
Continue using legacy license installation…
Ensure required Android SDK components
Failed to ensure android components, error: output: Configuration on demand is an incubating feature.

is the solution below valid still. If yes, where should i enter these values.

yes | sdkmanager --licenses

I’m new to bitrise. Can you pls advise as it is quite important to resolve at the earllest.

It’s still valid.
You should enter it in a script step somewhere before your build step.

Thanks a lot for helping out. That license issue got fixed, but it throws the following error

Task :app:stripReleaseDebugSymbols FAILED
WARNING: Support for ANDROID_NDK_HOME is deprecated and will be removed in the future. Use android.ndkVersion in build.gradle instead.
Support for ANDROID_NDK_HOME is deprecated and will be removed in the future. Use android.ndkVersion in build.gradle instead.
Task :app:mergeDexRelease
w: Detected multiple Kotlin daemon sessions at build/kotlin/sessions
FAILURE: Build failed with an exception.

  • What went wrong:
    Execution failed for task ‘:app:stripReleaseDebugSymbols’

No version of NDK matched the requested version 21.0.6113669. Versions available locally: 21.4.7075529

Should i use android.ndkVersion in build.gradle? Is that the only problem here.

You can use install-missing-android-tools step. New version with NDK support fixed was just released Release 3.0.0 · bitrise-steplib/steps-install-missing-android-tools · GitHub


I got this issue

Failed to set executable permission for gradlew, error: chmod : no such file or directory

It looks like you are passing an empty string as a gradlew path input value.

should be like this, right?

React Native Project

I’m using install-missing-android-tools. Also if possible and do you know if the version 3.0.x install-missing-android-tools is compatible for react-native 61.5 version?

And secondly i suppose selecting the 3.0.x in install-missing-android-tools would automatically resolve the NDK version.

Please advise

By default it should be android/gradlew
not build.gradle
However, I’m not 100% sure how does it work in case of RN this file may be generated by RN toolchain perhaps in a different location.

I don’t know.

It should. That was one of the goals of 3.x release I suppose.

we don’t have this folder /.gradlew in the Repo!

Maybe can @baranit help us how they set the gradlew path in his project!

It is gradlew present on your screen. Without the leading dot. There was a typo in my previous message. Just corrected it. Sorry for the confusion.

uh no problem, well, thx i will check it.

did you have faced this issue before?