In the process of learning Flutter, I built a window desk desktop application and found the following error:
CMake Error at CMakeLists.txt:3 (project): No CMAKE_CXX_COMPILER could be found. flutter desktop, the following solution was found on Stack Overflow:
Open vs installer, then click [Modify], the above picture will appear, find the windows sdk option in the installation details on the right, check all the download and installation, and then flutter clean and then rebuild.