Hi@akhtar,
If you do not have the JDK software installed or if JAVA_HOME is not set, then Flutter will give this error message. The following tasks provide the information you need to install the JDK software and set JAVA_HOME on UNIX or Windows systems.
Hope this helps!
Check out Java training online to become certified expert.
Thanks!