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?
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
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
@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
Retryingā¦
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.
#!/bin/bash
yes | sdkmanager --licenses
Iām new to bitrise. Can you pls advise as it is quite important to resolve at the earllest.
@koral
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.
@koral
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.
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.