android installation_error ai_generated true

Failed to install the following Android SDK packages as some licenses have not been accepted

ID: android/sdk-packages-not-found

Also available as: JSON · Markdown
92%Fix Rate
92%Confidence
3Evidence
2023-01-01First Seen

Version Compatibility

VersionStatusIntroducedDeprecatedNotes
any active

Root Cause

Android SDK packages not installed or licenses not accepted. Common in CI/CD and fresh setups.

generic

Workarounds

  1. 95% success Accept all SDK licenses non-interactively
    yes | sdkmanager --licenses

    Sources: https://developer.android.com/build/

  2. 90% success Set ANDROID_HOME and install required packages
    export ANDROID_HOME=$HOME/Android/Sdk; sdkmanager 'platform-tools' 'platforms;android-34'
  3. 88% success Use sdkmanager to install specific missing packages
    sdkmanager --list  # find package names; sdkmanager 'build-tools;34.0.0'

Dead Ends

Common approaches that don't work:

  1. Download SDK packages manually from Google archives 80% fail

    Manual downloads miss dependency packages and do not register licenses

  2. Accept licenses interactively when running in CI 85% fail

    CI has no interactive terminal. Licenses must be accepted non-interactively.