You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

如何解决IntelliJ创建Flutter项目时‘where’命令未识别的问题?

Fixing the "where is not recognized" Error When Creating Flutter Projects in IntelliJ

Hey there, let's work through this frustrating error together! I've seen similar issues pop up with Flutter and Windows environment setups, so here are some targeted steps to get you back on track:

First, Make Sure Your Environment Variable Changes Actually Stuck

  • A super common gotcha: IntelliJ doesn't automatically pick up new environment variables after you edit them. You need to fully close the IDE—including any background processes running in the task manager—and restart it before trying again.
  • Test the where command directly in Command Prompt (CMD): Open CMD and type just where. If it still throws the same error, your Path variable setup might be off:
    • Double-check that you added C:\Windows\System32 (the directory containing where.exe) to your system Path variable, not the full path to where.exe itself. Path is meant for directories, not individual files.
    • Look for typos: extra spaces, missing backslashes, or accidental characters can break the path.
    • If all else fails, restart your computer. Sometimes Windows needs a full reboot to apply environment variable changes properly.

Verify IntelliJ's Flutter SDK Setup

  • Open IntelliJ's Settings (File > Settings on Windows/Linux, IntelliJ IDEA > Settings on Mac), navigate to Languages & Frameworks > Flutter.
  • Confirm the Flutter SDK path is correct (e.g., C:\flutter—match wherever you installed Flutter).
  • Run flutter doctor directly from this settings page using the dedicated button. If the error shows up here too, it's likely a system-level issue rather than an IDE quirk.

Additional Troubleshooting Tips

  • Check if where.exe exists: Head to C:\Windows\System32 and make sure the file is there. If it's missing, you can copy it from another working Windows machine or use Windows' System File Checker (run sfc /scannow in CMD as admin) to restore corrupted/missing system files.
  • Run IntelliJ as admin: Right-click the IntelliJ icon and select "Run as administrator". Sometimes restricted permissions prevent the IDE from accessing system-level executables like where.exe.
  • Reset Flutter's configuration: Open CMD, run flutter config --clear, then re-run flutter doctor to let Flutter re-detect your environment from scratch.

If none of these steps resolve the issue, share the full output of flutter doctor -v (run in CMD) and we can dig deeper into what's going wrong.

内容的提问来源于stack exchange,提问作者meditat

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.22 08:56:10