Unable to find bundled java version как исправить

For those having these issues with the latest Android Studio — Electric Eel version, and other canaries and preview releases, note that the bundled jre directory in the Android Studio installation folder is now renamed to jbr

To resolve this, just create a sym link jre -> jbr and Flutter won’t complain.

On Linux

cd ~/android-studio/ && ln -s jbr jre

Windows (check installation folder)

cd C:Program FilesAndroidAndroid Studio
mklink /D "jre" "jbr"

or

New-Item -ItemType SymbolicLink -Path .jre -Target .jbr

Mac OS

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

Note that if you are running a preview release, and depending on your OS, the default installation directory might be different, e.g. on Linux it would be

~/android-studio-preview/

In either case, you can check the installation directory by running

flutter doctor -v

Also, in case if you run with permissions issues, you can try running the command with admin privileges, depending on your OS.

For example on Mac/Linux, you can just run the same command with sudo and it should work, additionally on Mac, you’ll have to configure the Disk Access permissions, depends on your version, but most probably can be found under:

Settings - Privacy & Security - Full Disk Access - Terminal

baranhuseyinkencu@BARAN-MacBook-Air ~ % flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 3.7.5, on macOS 13.2.1 22D68 darwin-arm64, locale tr-TR)
[✓] Android toolchain — develop for Android devices (Android SDK version 33.0.2)
[✓] 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.
[✓] IntelliJ IDEA Community Edition (version 2022.3.2)
[✓] VS Code (version 1.75.1)
[✓] Connected device (2 available)
[✓] HTTP Host Availability

! Doctor found issues in 1 category.
baranhuseyinkencu@BARAN-MacBook-Air ~ % flutter doctor -v
[✓] Flutter (Channel stable, 3.7.5, on macOS 13.2.1 22D68 darwin-arm64, locale tr-TR)
• Flutter version 3.7.5 on channel stable at /Users/baranhuseyinkencu/development/flutter
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision c07f788 (2 days ago), 2023-02-22 17:52:33 -0600
• Engine revision 0f359063c4
• Dart version 2.19.2
• DevTools version 2.20.1

[✓] Android toolchain — develop for Android devices (Android SDK version 33.0.2)
• Android SDK at /Users/baranhuseyinkencu/Library/Android/sdk
• Platform android-33-ext4, build-tools 33.0.2
• Java binary at: /Applications/Android Studio.app/Contents/jre/Contents/Home/bin/java
• Java version OpenJDK Runtime Environment (build 11.0.15+0-b2043.56-8887301)
• All Android licenses accepted.

[✓] Xcode — develop for iOS and macOS (Xcode 14.2)
• Xcode at /Applications/Xcode.app/Contents/Developer
• Build 14C18
• CocoaPods version 1.11.3

[✓] Chrome — develop for the web
• Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 2022.1)
• Android Studio at /Applications/Android Studio.app/Contents
• Flutter plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/9212-flutter
• Dart plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/6351-dart
• Java version OpenJDK Runtime Environment (build 11.0.15+0-b2043.56-8887301)

[✓] IntelliJ IDEA Community Edition (version 2022.3.2)
• IntelliJ at /Applications/IntelliJ IDEA CE.app
• Flutter plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/9212-flutter
• Dart plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/6351-dart

[✓] VS Code (version 1.75.1)
• VS Code at /Applications/Visual Studio Code.app/Contents
• Flutter extension version 3.58.0

[✓] Connected device (2 available)
• macOS (desktop) • macos • darwin-arm64 • macOS 13.2.1 22D68 darwin-arm64
• Chrome (web) • chrome • web-javascript • Google Chrome 110.0.5481.100

[✓] HTTP Host Availability
• All required HTTP hosts are available

• No issues found!

baranhuseyinkencu@BARAN-MacBook-Air ~ % flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 3.7.5, on macOS 13.2.1 22D68 darwin-arm64, locale tr-TR)
[✓] Android toolchain — develop for Android devices (Android SDK version 33.0.2)
[✓] Xcode — develop for iOS and macOS (Xcode 14.2)
[✓] Chrome — develop for the web
[✓] Android Studio (version 2022.1)
[✓] IntelliJ IDEA Community Edition (version 2022.3.2)
[✓] VS Code (version 1.75.1)
[✓] Connected device (2 available)
[✓] HTTP Host Availability

• No issues found

why do i have «Intellij idea» inside the list.

Problem:

Cause: If you run “flutter doctor” on your terminal and you see something similar to the screenshot below, Java cannot be found on your system and is the cause of this error.

1. To fix this kind of Error you must check first the java and jdk version. If you have already installed java in your pc or laptop. Run this command java -version and echo %JAVA_HOME% on command prompt.

Command: echo %JAVA_HOME%

If the version shows in the command for java and jdk in your pc or laptop is the same proceed to the step 2.

2. Check the System Environment Variables

  • To Access the Environment Variables, use search bar on the windows and search System Environment Variable

  • Click the Edit System Environment Variables after that click the button Environment Variables..

  • Click JAVA_HOME Enviroment Variable on system environment.

Check if the jdk version on your pc or laptop is the same on the JAVA_HOME Environment Variables. Now if it is still the same click the Path on the System Variables.

How about if you have not already set the Environment Variable JAVA_HOME in your pc or laptop. You can learn how to set up this environment variables on https://confluence.atlassian.com/doc/setting-the-java_home-variable-in-windows-8895.html

Even the system JAVA_HOME Environment Variable  of your is the same with the jdk version on your system  and still not detected you must try the step 3.

3.  Goes to Local Disk C and browse the Program Files and follow this following steps:

  1. First, right-click the Android Studio icon and open the file directory(location). Your installation folder should be at “C:Program FilesAndroidAndroid Studio”.
  2. When you are already at the Android Studio installation root folder, you will see two folders: “jbr” and “jre“.
  3. Copy all the files inside the “jbr” folder to the “jre” folder, then try it again.

Paste the files from jbr in jre

Run again the flutter doctor command

Issue

I am using Android Studio under Windows 10 to make run a flutter project, however I have this warning I would like to fix :

X Unable to determine bundled Java version.
    • Try updating or re-installing Android Studio.

I have already try multiple solutions exposed on Stackoverflow / Git but no ones worked.

Here the settings of my project :

enter image description here

enter image description here

enter image description here

Here my flutter doctor :

C:libflutterbinflutter.bat doctor --verbose
[√] Flutter (Channel stable, 2.2.3, on Microsoft Windows [version 10.0.19042.1165], locale fr-FR)
    • Flutter version 2.2.3 at C:libflutter
    • Framework revision f4abaa0735 (8 weeks ago), 2021-07-01 12:46:11 -0700
    • Engine revision 241c87ad80
    • Dart version 2.13.4

[√] Android toolchain - develop for Android devices (Android SDK version 30.0.2)
    • Android SDK at C:/Users/[MY_USER]/AppData/Local/Android/Sdk
    • Platform android-30, build-tools 30.0.2
    • ANDROID_HOME = C:/Users/[MY_USER]/AppData/Local/Android/Sdk
    • Java binary at: C:Program FilesJavajdk1.8.0_291binjava
    • Java version Java(TM) SE Runtime Environment (build 1.8.0_291-b10)
    • All Android licenses accepted.

[√] Chrome - develop for the web
    • Chrome at C:Program FilesGoogleChromeApplicationchrome.exe

[!] Android Studio (version 4.1.0)
    • Android Studio at C:Program FilesAndroidAndroid Studio
    • Flutter plugin can be installed from:
       https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
       https://plugins.jetbrains.com/plugin/6351-dart
    X Unable to determine bundled Java version.
    • Try updating or re-installing Android Studio.

[√] VS Code (version 1.59.1)
    • VS Code at C:Users[MY_USER]AppDataLocalProgramsMicrosoft VS Code
    • Flutter extension can be installed from:
       https://marketplace.visualstudio.com/items?itemName=Dart-Code.flutter

[√] Connected device (3 available)
    • Android SDK built for x86 (mobile) • emulator-5554 • android-x86    • Android 11 (API 30) (emulator)
    • Chrome (web)                       • chrome        • web-javascript • Google Chrome 92.0.4515.159
    • Edge (web)                         • edge          • web-javascript • Microsoft Edge 92.0.902.84

! Doctor found issues in 1 category.
Process finished with exit code 0

Could you provide help please ?

Solution

So here the action I have done:
Install latest version of jdk: https://www.oracle.com/java/technologies/javase-downloads.html

Install latest version of jre: https://www.oracle.com/java/technologies/javase-jre8-downloads.html

Go to: C:Program FilesAndroid and remove all version of Android Studio

Go to Windows search: Environement Variables > Environement Variables > System Variables and add JAVA_HOME with value the path to your jdk (C:Program FilesJavajdk-16.0.2)

Install Android Studio again

Go to file > Project Structure

enter image description here

Put your JDK path:

enter image description here

enter image description here

Go to file > Settings

enter image description here

Click on Show Package Details and retrograde to 20.1 or 22.2 (not sur for 22.2 but read that for some it works)

enter image description here

Verify you’re on a stable version:

enter image description here

flutter pub get
flutter pub upgrade
flutter pub outdated
flutter doctor -v

and it should be good: • Java version OpenJDK Runtime Environment (build 11.0.10+0-b96-7249189)

Answered By — Da2ny

Hello Guys, How are you all? Hope You all Are Fine. Today I just Updated Android Studio And Now I am facing following error Unable to find bundled Java version after updated android studio Arctic Fox(2020.3.1) Flutter in Android-Studio. So Here I am Explain to you all the possible solutions here.

Without wasting your time, Let’s start This Article to Solve This Error.

Contents

  1. How Unable to find bundled Java version after updated android studio Arctic Fox(2020.3.1) Flutter Error Occurs ?
  2. How To Solve Unable to find bundled Java version after updated android studio Arctic Fox(2020.3.1) Flutter Error ?
  3. Solution 1
  4. Solution 2
  5. Summery

I just updated my android studio and now I am facing an error. My flutter doctor Output Give me the Following error.


Unable to find bundled Java version

How To Solve Unable to find bundled Java version after updated android studio Arctic Fox(2020.3.1) Flutter Error ?

  1. How To Solve Unable to find bundled Java version after updated android studio Arctic Fox(2020.3.1) Flutter Error?

    To Solve Unable to find bundled Java version after updated android studio Arctic Fox(2020.3.1) Flutter Error Just You have to set JAVA Path in your System will resolve this issue. Just Run this command line in your terminal. cd /Applications/Android Studio.app/Contents/jre ln -s ../jre jdk ln -s “/Library/Internet Plug-Ins/JavaAppletPlugin.plugin” jdk flutter doctor -v

  2. Unable to find bundled Java version after updated android studio Arctic Fox(2020.3.1) Flutter

    To Solve Unable to find bundled Java version after updated android studio Arctic Fox(2020.3.1) Flutter Error Just You have to set JAVA Path in your System will resolve this issue. Just Run this command line in your terminal. cd /Applications/Android Studio.app/Contents/jre ln -s ../jre jdk ln -s “/Library/Internet Plug-Ins/JavaAppletPlugin.plugin” jdk flutter doctor -v

Solution 1

Just You have to set JAVA Path in your System will resolve this issue. Just Run this command line in your terminal.

1. cd /Applications/Android Studio.app/Contents/jre

2. ln -s ../jre jdk

3. ln -s "/Library/Internet Plug-Ins/JavaAppletPlugin.plugin" jdk

4. flutter doctor -v

Solution 2

If You Are using JetBrains Toolbox then just follow this command to solve this error.

1. cd /Users/username/Library/Application Support/JetBrains/Toolbox/apps/AndroidStudio/ch-0/203.7583922/Android Studio.app/Contents/jre

2. ln -s ../jre jdk

3. ln -s "/Library/Internet Plug-Ins/JavaAppletPlugin.plugin" jdk

4. flutter doctor -v

Summery

It’s all About this issue. Hope all solution helped you a lot. Comment below Your thoughts and your queries. Also, Comment below which solution worked for you?

Also Read

  • SyntaxError: invalid syntax to repo init in the AOSP code.

Понравилась статья? Поделить с друзьями:
  • Как найти значок настройки на самсунге
  • Как найти мои вопросы на майл ру
  • Как найти гомологи среди веществ
  • Как составить акт недостачи документов
  • Как составить психолого педагогическое заключение