# flutter doctor: Android license status unknown. Run `flutter doctor --android-licenses` to accept the SDK licenses

**Code:** `Android license status unknown / licenses not accepted` · **Category:** Flutter / Dart · **Seen on:** Flutter, Android

The Android SDK licenses have not been accepted, so builds cannot download or use SDK components.

## Meaning

Run `flutter doctor --android-licenses` and answer `y` to each. If it fails, the command-line tools or a compatible Java version are missing; install "Android SDK Command-line Tools (latest)" in Android Studio's SDK Manager and set `JAVA_HOME` to JDK 17.

## Common causes

- Licenses never accepted on this machine
- cmdline-tools component missing
- Wrong Java version for sdkmanager
- ANDROID_HOME/ANDROID_SDK_ROOT not set
- SDK installed under another user

## Quick fix

1. Install cmdline-tools in the SDK Manager
2. Run `flutter doctor --android-licenses` and accept all
3. Set JAVA_HOME to JDK 17

## Detailed fix by platform

### Flutter

1. `flutter doctor --android-licenses && flutter doctor -v`

## How to diagnose

1. **Tools** — cmdline-tools installed?
2. **Java** — Version 17?
3. **Path** — ANDROID_HOME set?

---
Source: [WhatIsMyError](https://whatismyerror.com/errors/flutter/android-licenses-not-accepted)
