5

When running command flutter doctor getting 1 issue:

[✓] Flutter (Channel stable, 2.8.1, on macOS 13.1 22C65 darwin-x64, locale en-IN) [✓] Android toolchain - develop for Android devices (Android SDK version 33.0.0) [✓] Xcode - develop for iOS and macOS (Xcode 14.2) [✓] Chrome - develop for the web [!] Android Studio (version 2022.1) ✗ Unable to find bundled Java version. [✓] VS Code (version 1.69.2) [✓] Connected device (2 available) 

System config:

macOS Ventura v13.1 | Intel chip

Android Studio Electric Eel(Stable version v2022.1.1)

JAVA_HOME=/Applications/Android\ Studio.app/Contents/jbr/Contents/Home

java -version command is working perfectly in terminal.

5
  • try update Android cmdline-tools this Commented Jan 14, 2023 at 2:41
  • @bakboem I've latest Android cmdline-tools Commented Jan 14, 2023 at 5:02
  • try this Commented Jan 14, 2023 at 5:26
  • Looks like with the release of Electrci Eel the directory where JRE lives changed to JRB. Check this answer. Commented Jan 16, 2023 at 4:30
  • Just delete JRE folder: stackoverflow.com/questions/75108707/… Commented Jan 23, 2023 at 5:16

6 Answers 6

14
  1. Go to your AndroidStudio folder

(e.g. C:\Program Files\Android\Android Studio) in Windows

  1. There you'll find the jbr and jre folder So all you need to do is to copy the content of jbr and paste the content into the jre folder.
Sign up to request clarification or add additional context in comments.

2 Comments

Yes, I confirm that this workaround works for me (on Windows). This is documented on this GitHub Issue and it should work also on Mac. The bug is also open on Google Tracker
@Ali Usama perfect solution. Worked instantly!
4

For Windows:

The problem is because of trace of old Android Studio java folder, just delete this folder and it starts working:

C:\Program Files\Android\Android Studio\jre

The new Android Studio Electric Eel is using jbr, not jre.


For macOS as @Jayanth replied above: If you are using macOS replace the path in .bash_profile or .zshrc

export JAVA_HOME="/Applications/Android Studio.app/Contents/jre/Contents/Home" 

with

export JAVA_HOME="/Applications/Android Studio.app/Contents/jbr/Contents/Home" 

Comments

1

For Linux:

Run the following command in the terminal.

$ flutter config --android-studio-dir= 

1 Comment

This worked on Windows also!
0

Open your AndroidStudio folder

copy All Content of "jbr" Folder into the "jre" folder.

Worked For Me.

Comments

0

First Go On "C:\Program Files\Android\Android Studio" Copy All Data in jbr folder to jre

And

Set System Varaible (windows) Name: JAVA_HOME Value: C:\Program Files\Android\Android Studio\jre

Then Restart your terminal

Comments

0

I had two AndroidStudio folders. One was AndroidStudio other AndroidStudio1. After I deleted AndroidStudio (older) flutter doctor doesn't return warning.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.