Home > Java > javaTutorial > body text

How to Fix the \'Unable to Find Bundled Java Version\' Error in Flutter?

Patricia Arquette
Release: 2024-11-18 18:47:03
Original
418 people have browsed it

How to Fix the

Troubleshooting "Unable to Find Bundled Java Version" Error in Flutter

When running the "flutter doctor" command on Android Studio version 3.0, some users encounter the error "Unable to find bundled Java version." This issue may arise despite having the latest Java version (1.8.0_131-b11) installed on Windows 10.

Solution for Mac:

For JetBrains Runtime "Android Studio Electric Eel":

  1. Follow the article to set the JAVA_HOME path.
  2. Execute the following commands:

    cd /Applications/Android\ Studio.app/Contents/jbr
    ln -s ../jbr jdk
    ln -s "/Library/Internet Plug-Ins/JavaAppletPlugin.plugin" jdk
    Copy after login
  3. In the Finder, right-click on "Android Studio" > "Show Package Contents."
  4. Open the "contents" folder and create a new folder named "jre."
  5. Copy the contents of the "JetBrainsRuntime" folder into "jre."

For Other Versions:

  1. Execute the following commands:

    cd /Applications/Android\ Studio.app/Contents/jre
    ln -s ../jre jdk
    ln -s "/Library/Internet Plug-Ins/JavaAppletPlugin.plugin" jdk
    Copy after login
  2. Run "flutter doctor -v" to verify the fix.

For Mac Users with JetBrains Toolbox:

  1. Set the JAVA_HOME path according to the provided article.
  2. Replace "username" with your macOS username and run the following commands:

    cd /Users/username/Library/Application Support/JetBrains/Toolbox/apps/AndroidStudio/ch-0/203.7583922/Android Studio.app/Contents/jre
    ln -s ../jre jdk
    ln -s "/Library/Internet Plug-Ins/JavaAppletPlugin.plugin" jdk
    
    flutter doctor -v
    Copy after login
  3. If the issue persists, try the following workaround:

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

By following these steps, you can resolve the "Unable to find bundled Java version" error in Flutter and continue with your development.

The above is the detailed content of How to Fix the \'Unable to Find Bundled Java Version\' Error in Flutter?. For more information, please follow other related articles on the PHP Chinese website!

source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Articles by Author
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template