Skip to content

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

@LuminLynx

Description

@LuminLynx

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. 

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions