Skip to content

Respect Android SDK tools selected on PATH - #498

Open
mrousavy wants to merge 2 commits into
ReactiveCircus:mainfrom
mrousavy:fix/respect-sdk-tools-path
Open

mrousavy wants to merge 2 commits into
ReactiveCircus:mainfrom
mrousavy:fix/respect-sdk-tools-path

Conversation

@mrousavy

Copy link
Copy Markdown

When android-actions/setup-android selects a versioned SDK installation, this action prepends cmdline-tools/latest/bin and switches back to the runner's preinstalled tools. In this run, setup installed command-line tools 22.0 while latest still contained 12.0. SDK metadata compatibility warnings appeared when the emulator action started.

Preserve the existing PATH when both sdkmanager and avdmanager are available. Otherwise, use the existing installation/download fallback. Platform tools are still added to PATH.

The regression tests execute shell stand-ins for both SDK installations. They cover selecting versioned tools over latest, tools installed outside the default directory, the preinstalled and downloaded fallbacks, and a PATH containing only sdkmanager. The first two tests fail on current main. Build, lint, and all 37 tests pass on Node 24.21.0; compiled lib/ is included.

Related to #494, which upgrades the preinstalled tool revision. This addresses honoring tools selected by an earlier step. I found the PATH issue while investigating #496, but have not established whether it caused that archive error.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant