If you are receiving an error message stating that you are unable to find the bundled Java version when running the flutter
command, it is possible that the Flutter tool is not able to find the Java runtime or compiler on your system.
To resolve this issue, you will need to ensure that you have the Java Development Kit (JDK) installed on your system and that it is properly configured. You can download the JDK from the Oracle website and follow the installation instructions for your operating system.
Once you have installed the JDK, you may need to update your system's PATH
environment variable to include the path to the java
executable. This will allow you to use the java
and javac
commands from the command line.
To update your PATH
, you can add the following line to your ~/.bash_profile
file (or create this file if it doesn't exist):
export PATH="/path/to/java/bin:$PATH"
Replace /path/to/java/bin
with the path to the bin
directory of the JDK installation.
Once you have updated your PATH
, close and reopen your terminal window and try running the flutter
command again. This should allow the Flutter tool to find the Java runtime and compiler on your system.