Fix Android SDK setup after runner image dropped legacy 'tools' package

The GitHub-hosted runner image rolled out on ~2026-09-14 ships
cmdline-tools 12.0, whose sdkmanager no longer resolves the obsolete
'tools' (legacy Android SDK Tools) package. The android-actions/setup-android
step inherits the action default packages 'tools platform-tools' and thus
failed with "Failed to find package 'tools'" (exit code 1) before the build
script even ran. The same request in buildAndUpdateProduct.sh would fail
the same way once reached.

Override the action's packages input to 'platform-tools' and drop the
trailing 'tools' argument from the sdkmanager call in
buildAndUpdateProduct.sh. build-tools, platform-tools and the platform
are still installed by the script. The cmdline-tools-version pin is left
unchanged.

Assisted-By: Claude (claude-4.8-opus)
This commit is contained in:
Axel Uhl committed 2026-09-15 00:15:54 +02:00
1 parent 35068d7799
commit 40cc60ca8f
2 files changed
+8 -1

No files matched your search

+7
View File
@@ -194,6 +194,13 @@ jobs:
with:
log-accepted-android-sdk-licenses: 'false'
cmdline-tools-version: 9123335 # This corresponds to human-friendly version number 8.0
# The action's default 'packages' is "tools platform-tools". The legacy "tools"
# package was removed from Google's SDK repository; as of the ~2026-09-14 runner
# image (cmdline-tools 12.0 preinstalled) sdkmanager no longer resolves it and the
# step fails with "Failed to find package 'tools'". We only need the action to
# bootstrap cmdline-tools here; buildAndUpdateProduct.sh installs build-tools,
# platform-tools and the platform itself. So request just platform-tools.
packages: 'platform-tools'
- name: Start MongoDB
uses: supercharge/mongodb-github-action@315db7fe45ac2880b7758f1933e6e5d59afd5e94 #v1.12.1
with: