Skip to content

Fixing "Unable to find bundled Java version" in Flutter After Android Studio Update ​

This guide addresses the "Unable to find bundled Java version" error that occurs after updating Android Studio on macOS, particularly on Apple Silicon (M1) devices.

Root Cause ​

The issue occurs because newer Android Studio versions (Arctic Fox 2020.3.1 and later) use a jbr (JetBrains Runtime) folder instead of the traditional jre (Java Runtime Environment) folder. Flutter's doctor command still expects to find a jre directory, causing the error.

This is the most widely recommended solution for macOS users:

bash
# Navigate to Android Studio Contents directory
cd /Applications/Android\ Studio.app/Contents

# Create symbolic link from jbr to jre
ln -s jbr jre

# Update Flutter's Android Studio path configuration
flutter config --android-studio-dir /Applications/Android\ Studio.app

Method 2: Manual Folder Duplication ​

If symbolic links don't work for your setup:

  1. Open Finder and navigate to Applications
  2. Right-click on Android Studio and select "Show Package Contents"
  3. Open the Contents folder
  4. Duplicate the jbr folder
  5. Rename the copy to jre

Method 3: Windows Solution ​

For Windows users experiencing this issue:

cmd
# Run Command Prompt as Administrator
cd "C:\Program Files\Android\Android Studio"
mklink /d "jre" "jbr"

Additional Configuration ​

After applying the main fix, you might need to:

  1. Set JAVA_HOME environment variable (macOS):
bash
# Add to your shell profile (~/.zshrc or ~/.bashrc)
export JAVA_HOME="/Applications/Android Studio.app/Contents/jbr/Contents/Home"
  1. Accept Android licenses:
bash
flutter doctor --android-licenses
  1. Verify the fix:
bash
flutter doctor -v

Troubleshooting ​

WARNING

If you encounter "file exists" errors when creating symbolic links, use the -f (force) flag:

bash
ln -sf jbr jre

INFO

If you've installed a standalone JDK, ensure it's compatible with your system architecture (ARM64 for Apple Silicon M1).

Prevention ​

To avoid similar issues in the future:

  • Keep both Flutter SDK and Android Studio updated to their latest versions
  • Check for known compatibility issues before updating development tools
  • Maintain backup of your development environment configuration

Conclusion ​

The "Unable to find bundled Java version" error is a compatibility issue between newer Android Studio versions and Flutter's expectations. The symbolic link solution effectively bridges this gap without modifying original files. For most users, Method 1 provides the cleanest and most maintainable fix.

After applying these changes, your Flutter development environment should function correctly with the updated Android Studio version.