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.
CodePudding user response:
- Go to your AndroidStudio folder
(e.g. C:\Program Files\Android\Android Studio) in Windows
- There you'll find the
jbr
andjre
folder So all you need to do is to copy the content of jbr and paste the content into the jre folder.
CodePudding user response:
The "flutter doctor" command is used to check the setup of your development environment for building Flutter apps. The error message "Unable to find bundled Java version" suggests that the Flutter tool is unable to find a version of Java that is bundled with the Flutter SDK.
This issue typically occurs when your system doesn't have a Java runtime environment (JRE) installed or the JRE is not set up correctly. To resolve this issue, you need to install a Java Development Kit (JDK) on your system and configure your system environment variables to point to the location of the JDK.
You can download the latest version of the JDK from the official Oracle website and install it on your system. After installation, you need to set the JAVA_HOME environment variable to the location of the JDK and add the JDK's bin directory to your system's PATH. Once you've done this, you should be able to run the "flutter doctor" command without encountering the error message.