Fixing Android Studio Not Detected by `flutter doctor` (JetBrains Toolbox)
9 min read

Fixing Android Studio Not Detected by `flutter doctor` (JetBrains Toolbox)

When running flutter doctor, some Flutter developers find a confusing error: Android Studio is reported as not found, even though the app is installed and opens normally from the desktop shortcut or from Toolbox itself. This problem is very common on macOS and Linux, especially for those who install Android Studio via JetBrains Toolbox instead of the official installer. It’s important to understand from the start: the problem isn’t that Flutter is broken, but that Flutter doesn’t know where Android Studio is installed. This article discusses how to completely fix this problem, along with several related problems that often appear afterward.

Problem Background

When running:

flutter doctor

The error that appears usually looks like this:

[!] Android Studio
    ✗ Android Studio not found

This message looks as if Android Studio isn’t actually installed, when in reality the app exists on the system and can be run without any issues from the shortcut or from JetBrains Toolbox itself. This misunderstanding is what often makes developers try to reinstall Android Studio — even though that step won’t solve anything, because the root cause is somewhere else.

JetBrains Toolbox itself is an IDE manager application by JetBrains that allows installing, updating, and version-managing various IDEs (IntelliJ IDEA, PyCharm, Android Studio, and others) from one central place. This convenience has a consequence: Toolbox doesn’t install apps to the standard locations normally used by each IDE’s official installer, but to a special directory managed by Toolbox itself. For Android Studio users accustomed to Toolbox for all their JetBrains IDEs, this path difference often goes unnoticed until an error like this appears in flutter doctor.

Why This Happens

By default, Flutter only tries to detect Android Studio in the standard locations it already knows — usually the default installation directories like /Applications/Android Studio.app on macOS or /opt/android-studio on Linux. Meanwhile, JetBrains Toolbox installs Android Studio at a non-standard path entirely outside the list of locations Flutter checks, for example:

~/.local/share/JetBrains/Toolbox/apps/AndroidStudio/
flowchart TD
    A[flutter doctor runs] --> B{Check standard Android Studio locations}
    B -- Found --> C[Android Studio: installed]
    B -- Not found --> D[Android Studio not found]
    D --> E{Installed via JetBrains Toolbox?}
    E -- Yes --> F[Path is at a non-standard location]
    F --> G[Needs to be manually registered with Flutter]

Because of this location difference, three things happen at once: Android Studio genuinely exists on the system, the app opens normally from Toolbox, but flutter doctor still considers the app nonexistent because it only searches the locations it already knows, rather than searching the entire file system.


Verifying the Installation Before Fixing

Before directly registering the path, it’s a good idea to first make sure Android Studio is healthy and doesn’t have other installation problems unrelated to path detection. Open Android Studio manually from JetBrains Toolbox and make sure the app opens without errors. If Android Studio itself fails to open or shows an error at startup, the problem isn’t about path detection by Flutter, but the Android Studio installation itself needing repair or reinstall via Toolbox first.

After making sure Android Studio runs normally, the fastest way to find the exact installation path is through the menu inside Toolbox itself — there’s usually a “Settings” option or a gear icon on the Android Studio entry that shows the installation location explicitly. Alternatively, run a search via the terminal:

find ~/.local/share/JetBrains -maxdepth 4 -iname "*AndroidStudio*"

This find command searches the ~/.local/share/JetBrains directory up to 4 levels of subfolders deep, looking for folder names containing the word “AndroidStudio” regardless of capitalization (-iname). The result will show the exact path needed for the next step, without having to guess the currently installed version number.


Main Solution (Most Important)

Find the Android Studio Location

The first step is to make sure of the exact path where JetBrains Toolbox installs Android Studio. This path is usually in one of the following locations, depending on the operating system used:

Linux

~/.local/share/JetBrains/Toolbox/apps/AndroidStudio/

macOS

~/Library/Application Support/JetBrains/Toolbox/apps/AndroidStudio/

Inside that directory, there’s usually a folder structure like the following, with a version number that can differ depending on when Android Studio was last updated via Toolbox:

AndroidStudio/
└── ch-0/
    └── 2023.3.1/
        └── Android Studio.app

ch-0 here refers to the release channel (usually the stable channel), while 2023.3.1 is the specific installed version number. The full path Flutter needs is the path up to this version folder, not up to the .app file itself.

If you’re on Windows, JetBrains Toolbox also installs Android Studio at a similar non-standard location, usually at:

%LOCALAPPDATA%\JetBrains\Toolbox\apps\AndroidStudio\

The subfolder structure also follows the same ch-0/<version>/ pattern as on Linux and macOS, just with a Windows-style base path. The fixing principle remains identical on all three operating systems — only the path format differs.

Register the Android Studio Path with Flutter

Once the path is found, register it explicitly in Flutter’s configuration with the command:

flutter config --android-studio-dir="/path/to/AndroidStudio"

A concrete example for Linux, with a path that already includes the channel and version:

flutter config --android-studio-dir="$HOME/.local/share/JetBrains/Toolbox/apps/AndroidStudio/ch-0/2023.3.1"

The flutter config command stores this configuration permanently in Flutter’s configuration file, so it doesn’t need to be repeated every time you open a new terminal. After the path is registered, recheck the Flutter status with:

flutter doctor

In most cases, the problem is immediately solved once this step is run with the correct path — flutter doctor will immediately recognize Android Studio as installed and ready to use.

If JetBrains Toolbox updates Android Studio to a new version later, the version folder (2023.3.1 in the example above) will change its name, and you’ll need to rerun flutter config --android-studio-dir with the new version’s path. This is often the cause of the same error reappearing after an update.

Additional Problems That Often Appear

After the Android Studio path is successfully registered, several related problems can still appear because they’re connected to Android Studio’s own configuration.

Flutter & Dart Plugins Not Installed

If flutter doctor still shows:

✗ Flutter plugin not installed
✗ Dart plugin not installed

That means Android Studio is now detected, but the plugins needed for Flutter development aren’t installed in it yet. To fix:

  1. Open Android Studio
  2. Go to Settings → Plugins
  3. Search for and install the Flutter plugin (the Dart plugin will automatically be installed as its dependency)
  4. Restart Android Studio so the new plugins are truly active

Android SDK Not Detected

If Flutter can’t find the Android SDK, register its location explicitly:

flutter config --android-sdk="$HOME/Android/Sdk"

Additionally, make sure the relevant environment variables are set, because some Android command-line tools (like adb) need ANDROID_HOME to work correctly:

export ANDROID_HOME="$HOME/Android/Sdk"
export PATH="$ANDROID_HOME/platform-tools:$PATH"

Add these two lines to the shell profile file (.bashrc, .zshrc, or whichever matches the shell used) so these environment variables activate automatically every time a terminal opens, not just for the current terminal session.

The Android SDK itself is usually installed at the default location ~/Android/Sdk on Linux or ~/Library/Android/sdk on macOS — but if Android Studio was previously installed another way (for example a separate installer before switching to Toolbox), the SDK could be at a different location from the current Android Studio installation. Checking the SDK location through Android Studio itself (Settings → Languages & Frameworks → Android SDK) is the most reliable way to make sure the path registered with Flutter matches what’s actually used.

Command Line Tools Not Installed

Open Android Studio, then go to:

Settings → Android SDK → SDK Tools

Make sure the following two components are checked and installed:

  • Android SDK Command-line Tools
  • Android SDK Platform Tools

These components are often the hidden cause of errors in flutter doctor, because Android Studio can be fully installed while its command-line tools components aren’t — the two are separated as distinct options in the SDK Manager, and not everything is checked by default.

This happens because Android Studio and the Android SDK are actually two separate things even though they’re usually installed together. Android Studio is the IDE — the editor, debugger, and visual tooling. The Android SDK is the collection of command-line tools and libraries used for building, compiling, and running Android apps, including adb, aapt, and the emulator. The SDK Manager inside Android Studio provides options to manage these SDK components granularly, so it’s very possible for Android Studio to be perfectly installed while some SDK components Flutter needs weren’t checked.

After checking the missing components in the SDK Manager, restart the terminal before running flutter doctor again. Some environment variables and new tool paths aren’t immediately readable in a terminal session that was already open.

Java / JDK Problems

Sometimes a Java-related error appears:

Unable to find bundled Java version

The quick solution for this problem is registering the JDK path explicitly:

flutter config --jdk-dir="/path/to/jdk"

Usually the JDK is already bundled inside the Android Studio installation itself (the jbr folder, short for JetBrains Runtime), but Flutter fails to detect it automatically if the registered Android Studio path wasn’t correct in the previous step. Fixing --android-studio-dir first often indirectly solves this JDK problem too, because Flutter usually looks for the JDK relative to the registered Android Studio location.

As a quick reference, here’s a summary of the problems discussed along with their fix commands:

ProblemFix Command
Android Studio not foundflutter config --android-studio-dir="<path>"
Flutter/Dart plugin not installedInstall via Settings → Plugins in Android Studio
Android SDK not detectedflutter config --android-sdk="<path>"
Command-line tools not installedCheck in Settings → Android SDK → SDK Tools
Unable to find bundled Java versionflutter config --jdk-dir="<path>"

This table is useful as a quick checklist and easily accessible reference if you’ve already read this guide before and just need to recall the right commands, without rereading the full explanations from scratch.


Final Checklist

Before considering the problem solved, make sure all of the following points are fulfilled:

□ Android Studio path is configured (flutter config --android-studio-dir)
□ Android SDK is detected (flutter config --android-sdk if needed)
□ Flutter & Dart plugins are installed in Android Studio
□ Command-line tools are installed (Android SDK Command-line Tools, Platform Tools)
□ The terminal has been restarted after configuration changes

After all of the above points are fulfilled, run the final verification with:

flutter doctor -v

The -v (verbose) flag shows more complete details than regular flutter doctor, including the exact paths detected for each component. If all configurations are correct, Android Studio will appear as installed and ready to use in that output, and all the exclamation marks or crosses that previously appeared will turn into green checkmarks.


Summary

  • The “Android Studio not found” error in flutter doctor usually isn’t a sign Android Studio is broken — Flutter just doesn’t know its location.
  • JetBrains Toolbox installs Android Studio at a non-standard path, so it needs to be manually registered via flutter config --android-studio-dir.
  • The registered path must go up to the version folder (e.g. ch-0/2023.3.1), not up to the .app file itself.
  • Updating Android Studio via Toolbox changes the version folder, so the path needs to be re-registered after updates.
  • Flutter & Dart plugins, the Android SDK, command-line tools, and the JDK are separate components that can each be a source of their own errors.
  • Many related problems (like an undetected JDK) are automatically solved once the Android Studio path is correct.
  • Always restart the terminal after changing configuration, and do a final verification with flutter doctor -v to see the full details.

Portfolio