I think you don't have the JDK installed.
Check it out with this command (for example, on the command line):
flutter doctor
If there is an exclamation mark or a red cross next to the "Android toolchain" line, then you do not have the JDK installed.
The solution to this problem is very simple:
- Download JDK from this link;
- Extract it and rename the internal
folder “jdk8u202-b08” to “openjdk” and copy it under HDD or SSD (so
its path will be: C:openjdk);
- Set Some Environment variables
(search on google if you don't know). Name: "JAVA_HOME", path
"C:openjdk";
- To restart a computer.
This should help. Good luck!
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…