CMake Error: Could not create named generator Visual Studio 16 2019 in flutter

Viewed 1383

I want make windows app with flutter.so I installed Visual Studio 2019 with desktop development with c++.

when I use flutter run -d windows I see this error

I also installed latest version of CMake(version 3.20.0-rc4) and version of my Visual Studio is 16.0.0

2 Answers

I can tell from that image you aren't actually running cmake 3.20

Because Ninja Multi-Config isn't being listed as a generator. That flutter command you used isn't using the CMake you installed on your system. Or you need to restart your machine.

I find the problem.

for resolve this problem I have 3 different way and I'm not sure which one resolve this problem.

first uninstall CMake

  • if you run flutter doctor and don't see any error create another flutter project with flutter create <project_name> and run that with flutter run -d windows
  • I was using Windows SDK version 10.0.17763.0 I update that to latest version(10.0.19041.0)
  • I update my visual studio 2019 to latest version(16.9.1)
Related