A green flutter doctor report is satisfying, but it is not the real finish line. The environment is ready when one known Flutter SDK can find one known Android SDK, Gradle can build a sample, and that app starts on an emulator or physical device. This walkthrough gets you there without treating every optional doctor warning as an emergency.
What a healthy Android setup contains
A Flutter SDK obtained from an official channel and writable by your normal user.
The Flutter SDK
bindirectory early enough inPATHthat the intendedfluttercommand wins.Android Studio or equivalent Android SDK tooling with Platform Tools, Command-line Tools, Build Tools, and at least one SDK Platform.
Accepted Android SDK license agreements for the packages the build uses.
Either an Android Virtual Device with working acceleration or an authorized physical device.
A supported Java runtime selected consistently by Flutter, Android Studio, and Gradle.
A sample project that analyzes, tests, builds, installs, and launches.
1. Prepare Ubuntu packages
sudo apt update
sudo apt install curl git unzip xz-utils zip libglu1-mesaPackage names shown are for supported Ubuntu releases; review the transaction before confirming.Risk level: caution. Review the command before running it.
These are host tools, not the Flutter SDK
curl,git,unzip,xz-utils, andzipsupport SDK acquisition, source control, archives, and builds.libglu1-mesasupplies a graphics library used by parts of the Linux tooling.sudo apt updaterefreshes package metadata;apt installchanges system packages, so read the proposed changes.Use your organization’s approved proxy, mirror, and package-management process when applicable.
The Android emulator has separate virtualization requirements checked later.
2. Install one Flutter SDK deliberately
Download the current stable Linux bundle or follow the official Git-based/manual installation instructions. Verify that the download came from Flutter’s official infrastructure. Extract it into a user-owned development directory whose path has no spaces or elevated-permission requirement; do not place the SDK inside a project repository or run Flutter routinely with sudo.
export FLUTTER_PARENT_DIR="/absolute/path/to/your/development-tools"
mkdir -p "$FLUTTER_PARENT_DIR"
tar -xf flutter_linux_<stable-version>-stable.tar.xz -C "$FLUTTER_PARENT_DIR"
"$FLUTTER_PARENT_DIR/flutter/bin/flutter" --versionFlutter <installed stable version> • channel stable
Dart <bundled compatible version>Keep the archive name explicit
Replace both placeholders with the directory and filename you actually downloaded from the official installation page.
The
*.tar.xznaming pattern changes with releases; do not copy a stale version number from an article.FLUTTER_PARENT_DIRis task-specific and points at a narrow user-owned directory.Running Flutter by absolute path proves the SDK itself starts before shell PATH configuration is involved.
Never extract an untrusted archive or pipe a downloaded installer directly into a privileged shell.
3. Put Flutter on PATH once
# Use the real absolute path chosen during installation.
export FLUTTER_ROOT="/absolute/path/to/your/development-tools/flutter"
export PATH="$FLUTTER_ROOT/bin:$PATH"PATH order decides which SDK runs
Set
FLUTTER_ROOTto the extractedflutterdirectory, not itsbinchild.Placing Flutter before the prior PATH makes this SDK win over stale Snap, package-manager, or old manual installs.
For Zsh, use the corresponding startup file; graphical IDEs may need a logout/login to inherit a changed environment.
Do not add a separate Dart
bindirectory ahead of Flutter’s bundled Dart.Keep machine-specific absolute paths out of shared project configuration.
command -v flutter
flutter --version
dart --version
flutter channel/absolute/path/to/your/development-tools/flutter/bin/flutter
Flutter <version> • channel stable
Dart SDK version: <bundled version>
stableAll four answers should describe one installation
command -vexposes an unexpected Snap or older SDK immediately.Flutter and Dart versions should be a compatible pair reported by the same Flutter installation.
Stable is the normal production-learning choice; beta/main channels require a deliberate reason.
If a shell and IDE disagree, compare their Flutter SDK path and environment rather than reinstalling everything.
4. Install Android Studio and SDK components
Install the current Android Studio release using Google’s supported Linux instructions. The Flutter plugin improves the IDE experience, but it does not install the Flutter SDK or the Android SDK for you. In SDK Manager, install a current SDK Platform required by your project plus Android SDK Platform-Tools, Android SDK Build-Tools, Android SDK Command-line Tools (latest), and Android Emulator if you will use a virtual device.
Record the Android SDK path displayed by Android Studio.
Install only platforms/system images you need; they consume meaningful disk space.
Keep Command-line Tools (latest) installed because license and package-management workflows depend on them.
Use Android Studio’s bundled runtime unless your selected Flutter/AGP compatibility guidance calls for another JDK.
Install the Flutter plugin from the IDE marketplace, restart, and point it at the Flutter SDK directory.
5. Tell Flutter which Android SDK to use
flutter config --android-sdk "/absolute/path/to/Android/Sdk"
flutter doctor -v[✓] Flutter ...
[!] Android toolchain ...
[✓] Android Studio ...The verbose report exposes paths and versions
Replace the placeholder with the path shown in Android Studio SDK Manager.
flutter configstores the selection for Flutter tooling; it does not download missing SDK components.flutter doctor -vshows which Flutter, Android SDK, Java, IDE, and device paths are actually active.A warning is a diagnosis to read, not permission to run every suggested command blindly.
Save the verbose report when asking for help, but review it for usernames, paths, proxy addresses, or other environment details before posting publicly.
6. Accept Android licenses knowingly
flutter doctor --android-licensesReview licenses interactively and accept only under your organization’s policy.Risk level: caution. Review the command before running it.
This command is interactive and legal, not cosmetic
Read each SDK license before accepting; workplace or classroom machines may require an administrator or policy owner.
The command needs Android Command-line Tools and a working Java selection.
“cmdline-tools component is missing” means install Command-line Tools (latest) in SDK Manager, then retry.
Java class/version errors often mean Android Studio, the shell, and Flutter are selecting different JDKs.
Rerun
flutter doctor -vafter completion to confirm the Android toolchain check changed.
7A. Create an accelerated Android emulator
lscpu | grep -E "Virtualization|Hypervisor"
ls -l /dev/kvm 2>/dev/null || true
flutter emulatorsVirtualization: VT-x or AMD-V
crw-rw---- ... /dev/kvm
<configured Android Virtual Device>Acceleration has firmware, kernel, and permission layers
Enable Intel VT-x or AMD-V in firmware when the machine supports it.
/dev/kvmindicates the KVM device exists; access also depends on user/group permissions.Nested virtualization may be unavailable or slow inside a virtual machine or restricted cloud runner.
Create an AVD in Android Studio Device Manager using a supported system image and suitable device profile.
A booted emulator must appear in
flutter devices; an AVD listed byflutter emulatorsis not necessarily running.
7B. Or connect a physical Android device
adb kill-server
adb start-server
adb devices -l
flutter devicesList of devices attached
SERIAL device product:... model:...
<device also listed by Flutter>Authorize the exact computer
Enable Developer options and USB debugging on a device you are authorized to use.
Unlock the device and approve its RSA fingerprint prompt;
unauthorizedmeans that trust step is incomplete.Use a data-capable cable and a USB mode that permits debugging.
Ubuntu device permissions may require maintained udev rules such as those supplied by the distribution’s Android platform-tools rules package.
Do not publish device serial numbers from diagnostic output. Revoke USB debugging authorizations after using an untrusted workstation.
8. Build and launch a real sample
flutter create doctor_check
cd doctor_check
flutter analyze
flutter test
flutter devices
flutter run -d <device-id>Analyzing doctor_check... No issues found!
All tests passed!
Launching lib/main.dart on <selected device>...This proves more than a row of checkmarks
flutter creategenerates a current project template tied to the installed SDK.flutter analyzechecks static diagnostics, whileflutter testruns the generated Dart test suite.Replace
<device-id>with an exact identifier fromflutter devices; explicit selection avoids launching on the wrong target.flutter runexercises Dart compilation, Gradle, Android SDK packages, ADB, installation, and runtime startup.Press
rfor hot reload while the command is active; useqto stop cleanly.
How to read flutter doctor
[✓]means that diagnostic passed with the selected environment; it does not certify every future project dependency.[!]is a warning or incomplete target. Read its indented details and decide whether that target matters.[✗]indicates a missing or broken requirement for that section. Fix the first causal error before secondary symptoms.A missing Chrome warning matters for Flutter web, not for an Android-only workstation.
Missing Linux desktop toolchain packages matter only when building Linux desktop apps.
No connected device is expected when no emulator is running and no phone is attached.
Run
flutter doctor -vwhen paths, Java versions, SDK packages, or device detection are ambiguous.
Frequent Ubuntu failures
`flutter: command not found`: open a new shell and verify the exported SDK path and startup file.
Wrong Flutter version: inspect
type -a flutterand remove or reorder stale PATH entries.Android SDK not found: configure the exact SDK Manager path and confirm it is readable.
cmdline-tools missing: install Android SDK Command-line Tools (latest) through SDK Manager.
Licenses fail with Java errors: compare the JDK reported by
flutter doctor -vwith the selected Android tooling requirements.Emulator is extremely slow: verify hardware virtualization and KVM access rather than increasing random AVD resources.
Device is unauthorized: approve the RSA prompt on the unlocked device and reconnect.
Permission denied in Flutter cache: identify files created by an earlier sudo invocation; repair only that narrow SDK/cache ownership.
Gradle download fails: inspect network, proxy, certificates, disk space, and corporate repository policy.
Doctor is green but the app fails: use the first project build stack trace; doctor cannot validate every plugin, native library, or application configuration.
Optional web and Linux desktop targets
Add Chrome and web tooling only if you intend to run Flutter web. Enable Linux desktop and install its documented compiler/build dependencies only if you intend to ship a Linux desktop application. Keeping optional targets absent is a valid, focused Android environment; their doctor warnings do not invalidate Android builds.
Decide which doctor sections must be green
Android application work requires Flutter, the Android toolchain, and at least one usable Android device target.
Flutter web work adds a supported browser and web-specific verification.
Linux desktop work adds the documented compiler, build system, GTK development libraries, and a desktop run test.
iOS development requires supported macOS hardware and Apple tooling; it cannot be completed from Ubuntu alone.
Record intentionally unsupported targets so future contributors do not mistake their warnings for environment regressions.
A reproducible handoff checklist
Flutter channel/version and SDK installation method are recorded.
command -v flutter, Flutter’s Dart, and IDE SDK selection point to the same installation.Android SDK path, installed platform/tools, and JDK selection are documented.
Licenses are accepted under the appropriate policy.
An emulator boots with acceleration or an authorized physical device appears in ADB and Flutter.
The generated sample analyzes, tests, builds, installs, starts, and hot reloads.
Only relevant doctor checks are required; optional target warnings are documented.
Project repositories pin their own dependencies and build configuration instead of depending on undocumented machine state.
Official Flutter and Android references
Install Flutter manually provides current Linux SDK download and PATH instructions.
Set up Android development covers Android Studio, SDK tools, licenses, emulator, and device validation.
Flutter installation troubleshooting addresses PATH, Java, and missing command-line tools.
Flutter CLI reference documents
doctor,devices,emulators,run, and related commands.Android emulator acceleration on Linux explains virtualization and KVM requirements.
Run Android apps on a hardware device covers USB debugging and Ubuntu device configuration.
Comments and corrections