Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Dec 15, 2025

The android-actions/setup-android@v3 action was prompting for manual license acceptance during SDK installation, blocking CI with "6 of 7 SDK package licenses not accepted" errors.

Changes

  • Added accept-android-sdk-licenses: true to all setup-android@v3 steps across 4 jobs (build, build-release, test, instrumented-test)
  • Retained existing sdkmanager --licenses steps as fallback
- name: Setup Android SDK
  uses: android-actions/setup-android@v3
  with:
    accept-android-sdk-licenses: true

This prevents interactive prompts during SDK setup that would otherwise hang the workflow.

Original prompt

This section details on the original issue you should resolve

<issue_title>The PR checks are failing during Android instrumented tests because the SDK license acceptance is hanging.</issue_title>
<issue_description>## Problem
The PR checks are failing during Android instrumented tests because the SDK license acceptance is hanging.

Error Details

The android-actions/setup-android@v3 action with accept-android-sdk-licenses: true is not properly accepting licenses automatically. The sdkmanager is prompting for manual input which blocks the CI pipeline.

Logs

The workflow gets stuck at:

  • "6 of 7 SDK package licenses not accepted"
  • Multiple "Accept? (y/N):" prompts that can't be answered in CI

Solution Options

  1. Pre-accept licenses by adding a step before setup-android:
- name: Accept Android licenses
  run: yes | $ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager --licenses || true
  1. Use environment variable:
env:
  ANDROID_SDK_ROOT: ${{ env.ANDROID_HOME }}
  ANDROID_LICENSE_ACCEPT: y
  1. Update the workflow to use a different approach:
- name: Setup Android SDK
  run: |
    mkdir -p $ANDROID_HOME/licenses
    echo "24333f8a63b6825ea9c5514f83c2829b004d1" > $ANDROID_HOME/licenses/android-sdk-license
    echo "84831b9409646a918e30573bab4c9c91346d8abd" > $ANDROID_HOME/licenses/android-sdk-preview-license

Files to Check

  • .github/workflows/ (the workflow file running instrumented tests)
  • Specifically the job "Instrumented Tests (API 23)"

Related

The quickest fix would be to update your workflow file to pre-accept the licenses before the setup-android action runs. 
```</issue_description>

## Comments on the Issue (you are @copilot in this section)

<comments>
</comments>


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Co-authored-by: LuminLynx <212206643+LuminLynx@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix SDK license acceptance in Android instrumented tests Fix Android SDK license acceptance hanging CI pipeline Dec 15, 2025
Copilot AI requested a review from LuminLynx December 15, 2025 02:24
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.

The PR checks are failing during Android instrumented tests because the SDK license acceptance is hanging.

2 participants