Unable to find bundled java version. flutter doctor

380 Views Asked by At

I'm facing this issue on windows after upgrading Android Studio to Electric Eel.

flutter doctor returns:

Doctor summary (to see all details, run flutter doctor -v):
[√] Flutter (Channel stable, 3.3.10, on Microsoft Windows [Version 10.0.22621.1105], locale en-US)
Checking Android licenses is taking an unexpectedly long time...[√] Android toolchain - develop for Android devices (Android SDK version 33.0.1)
[√] Chrome - develop for the web
[!] Visual Studio - develop for Windows (Visual Studio Community 2022 17.4.3)
    X The current Visual Studio installation is incomplete. Please reinstall Visual Studio.
[!] Android Studio (version 2022.1)
    X Unable to find bundled Java version.
[√] VS Code (version 1.74.3)
[√] Connected device (4 available)
[√] HTTP Host Availability

! Doctor found issues in 2 categories.

Android Studio (version 2022.1) Unable to find bundled Java version.


I've tried adding a JAVA_HOME kind of solution but didn't work for me.

2

There are 2 best solutions below

1
On

I had that problem today after updating Android Studio, and found an answer here:

https://github.com/flutter/flutter/issues/118502


The solution is basically:

  1. Go to your AndroidStudio folder (normally C:\Program Files\Android\Android Studio in Windows)
  2. Copy the content of jbr and paste the content into jre folder
0
On

Quick workaround from here: https://github.com/flutter/flutter/issues/118502#issuecomment-1384954269

Run in the terminal:

cd /Applications/Android\ Studio.app/Contents
ln -s jbr jre

*solution for MacOS