25

I am facing Unable to find bundled java version on window 11, How to solve it ? currently I used java 19. Please help me.

1

I changed multiple java version and environment variables but issue still not resolve. Also there's no duplicate old version of android studio.

vimuth
  • 5,064
  • 33
  • 79
  • 116
Htoo Htet Oo
  • 269
  • 1
  • 2
  • 5
  • 5
    Does this answer your question? [Unable to find bundled Java version on Flutter](https://stackoverflow.com/questions/51281702/unable-to-find-bundled-java-version-on-flutter) – Ahmad Hamwi Jan 14 '23 at 05:07
  • Does this answer your question? [Android Studio Electric Eel Unable to find bundled Java version. issue](https://stackoverflow.com/questions/75106727/android-studio-electric-eel-unable-to-find-bundled-java-version-issue) – Stanly Jan 29 '23 at 17:26

5 Answers5

58

On windows however I fixed it another way: I had to go to C:\Program Files\Android\Android Studio. There is already jre folder in there, but it contained signle empty file. Remove jre folder. Create a copy of jbr folder. Rename the copy to jre.

Naing Linn Aung
  • 596
  • 2
  • 2
  • 2
    A similar approach is just to copy the content of the **jbr** folder and paste it inside **jre** folder. – Ebena107 Jan 29 '23 at 08:48
  • 1
    This cause an error with Android Studio patch update is available. And it wastes of time to reinstall the latest version of Android studio. You should better backup all content and structure of `jre` folder even it contains only one subfolder (bin) and online one file (.marker) before copying the contents from `jbr`. According to my experience, this is just a `flutter doctor` bug that cannot detach the java bundle. I let the `flutter doctor` claim, but everything working find by just add path of `...\jbr\bin` to environment variables path (in Windows) – Say OL Feb 02 '23 at 23:57
  • 1
    It seems Flutter looks for java in jre folder, which does not exists anymore in Android Studio installation. Has anybody reported it to Flutter? – user1209216 Feb 13 '23 at 09:24
27

On Mac: Go to finder and find Android studio:

right click and click show package contents Create a new folder called jre copy the contents of the jbr folder and paste them into jre folder

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

This one worked for me ...

Lokesh
  • 385
  • 3
  • 7
8

I had this issue when I updated android studio from Dolphin to Electric Eel. I believe the patch process might have caused the java bundle in jre directory to be deleted. This is how I solved it.

  • Copy the files in C:\Program Files\Android\Android Studio\jbr and paste in C:\Program Files\Android\Android Studio\jre
  • run flutter doctor
Frank Adu
  • 81
  • 1
  • I had the same problem when I updated to Electric Eel. Can't they test it better? How on earth do you get the idea of copying any files in the programme folder from a to b? So good, you figured that out, thanks! – Sarah Trees Mar 19 '23 at 19:57
3

I had a similar issue, I deleted the contents of the jre file and replaced them with the contents of the jbr file, and it worked

1

I had solve this problem by uninstalled Android Studio (version 2022.1) and download the version of 4.2 to installed, even if it's not a better way to fix this. Maybe it can help you.

download the old version url: https://developer.android.com/studio/archive

When you in Terminal run "flutter doctor -v" to see details, it will suggest you to reinstall or update Android Studio.

Woody He
  • 11
  • 4