When I am using command prompt then write a doctor flutter --android-licenses then an error show on Please set the JAVA_HOME variable in your environment to match the location of your Java installation.
I tied to add a java variable in system environment but when I open it again command prompt writes again the error remains same