当我在对代码进行一些更改后尝试运行应用程序时会出现此问题。我尝试使用 vscode 命令运行Run Without Debugging
并出现此问题。当我删除 sdk 文件夹并再次下载时,它可以工作。但这不是正确的方法,因为我每次运行应用程序时都应该下载新的 SDK
(同样在没有调试的情况下点击运行后,flutter is not be recognized as internal or external command
将显示在终端中,我不知道为什么但它真的很奇怪,即使我添加了路径变量)
下面是vscode 的日志输出。
[12:51:44 PM] [General] [Info] Searching for SDKs...
[12:51:44 PM] [General] [Info] Environment PATH:
[12:51:44 PM] [General] [Info] C:\WINDOWS\system32
[12:51:44 PM] [General] [Info] C:\WINDOWS
[12:51:44 PM] [General] [Info] C:\WINDOWS\System32\Wbem
[12:51:44 PM] [General] [Info] C:\WINDOWS\System32\WindowsPowerShell\v1.0\
[12:51:44 PM] [General] [Info] C:\WINDOWS\System32\OpenSSH\
[12:51:44 PM] [General] [Info] D:\Git\cmd
[12:51:44 PM] [General] [Info] C:\Program Files (x86)\Yarn\bin\
[12:51:44 PM] [General] [Info] C:\ProgramData\chocolatey\bin
[12:51:44 PM] [General] [Info] C:\Program Files\Java\jdk1.8.0_211\bin
[12:51:44 PM] [General] [Info] C:\Program Files\nodejs\
[12:51:44 PM] [General] [Info] D:\MPLab\MPLAB C32 Suite\bin
[12:51:44 PM] [General] [Info] C:\Program Files\PuTTY\
[12:51:44 PM] [General] [Info] C:\Users\neyyu\AppData\Local\Programs\Python\Python38-32\Scripts\
[12:51:44 PM] [General] [Info] C:\Users\neyyu\AppData\Local\Programs\Python\Python38-32\
[12:51:44 PM] [General] [Info] C:\Users\neyyu\AppData\Local\Microsoft\WindowsApps
[12:51:44 PM] [General] [Info] C:\Users\neyyu\AppData\Local\Yarn\bin
[12:51:44 PM] [General] [Info] C:\Users\neyyu\AppData\Local\Android\Sdk\platform-tools
[12:51:44 PM] [General] [Info] D:\flutter\bin
[12:51:44 PM] [General] [Info] D:\Microsoft VS Code\bin
[12:51:44 PM] [General] [Info] C:\Users\neyyu\AppData\Roaming\npm
[12:51:44 PM] [General] [Info] C:\Users\neyyu\AppData\Local\Microsoft\WindowsApps
[12:51:51 PM] [General] [Info] Found Flutter project at C:\Users\neyyu\Desktop\first_flutter_project:
Mobile? true
Web? false
Create Trigger? false
Flutter Repo? false
[12:51:51 PM] [General] [Info] Searching for flutter.bat
[12:51:51 PM] [General] [Info] Looking for flutter.bat in:
[12:51:51 PM] [General] [Info] C:\Users\neyyu\Desktop\first_flutter_project
[12:51:51 PM] [General] [Info] C:\Users\neyyu\Desktop\first_flutter_project\bin
[12:51:51 PM] [General] [Info] D:\flutter\bin\
[12:51:51 PM] [General] [Info] C:\Users\neyyu\Desktop\first_flutter_project\.flutter
[12:51:51 PM] [General] [Info] C:\Users\neyyu\Desktop\first_flutter_project\.flutter\bin
[12:51:51 PM] [General] [Info] C:\Users\neyyu\Desktop\first_flutter_project\vendor\flutter
[12:51:51 PM] [General] [Info] C:\Users\neyyu\Desktop\first_flutter_project\vendor\flutter\bin
[12:51:51 PM] [General] [Info] C:\WINDOWS\system32
[12:51:51 PM] [General] [Info] C:\WINDOWS\system32\bin
[12:51:51 PM] [General] [Info] C:\WINDOWS
[12:51:51 PM] [General] [Info] C:\WINDOWS\bin
[12:51:51 PM] [General] [Info] C:\WINDOWS\System32\Wbem
[12:51:51 PM] [General] [Info] C:\WINDOWS\System32\Wbem\bin
[12:51:51 PM] [General] [Info] C:\WINDOWS\System32\WindowsPowerShell\v1.0\
[12:51:51 PM] [General] [Info] C:\WINDOWS\System32\WindowsPowerShell\v1.0\bin
[12:51:51 PM] [General] [Info] C:\WINDOWS\System32\OpenSSH\
[12:51:51 PM] [General] [Info] C:\WINDOWS\System32\OpenSSH\bin
[12:51:51 PM] [General] [Info] D:\Git\cmd
[12:51:51 PM] [General] [Info] D:\Git\cmd\bin
[12:51:51 PM] [General] [Info] C:\Program Files (x86)\Yarn\bin\
[12:51:51 PM] [General] [Info] C:\ProgramData\chocolatey\bin
[12:51:51 PM] [General] [Info] C:\Program Files\Java\jdk1.8.0_211\bin
[12:51:51 PM] [General] [Info] C:\Program Files\nodejs\
[12:51:51 PM] [General] [Info] C:\Program Files\nodejs\bin
[12:51:51 PM] [General] [Info] D:\MPLab\MPLAB C32 Suite\bin
[12:51:51 PM] [General] [Info] C:\Program Files\PuTTY\
[12:51:51 PM] [General] [Info] C:\Program Files\PuTTY\bin
[12:51:51 PM] [General] [Info] C:\Users\neyyu\AppData\Local\Programs\Python\Python38-32\Scripts\
[12:51:51 PM] [General] [Info] C:\Users\neyyu\AppData\Local\Programs\Python\Python38-32\Scripts\bin
[12:51:51 PM] [General] [Info] C:\Users\neyyu\AppData\Local\Programs\Python\Python38-32\
[12:51:51 PM] [General] [Info] C:\Users\neyyu\AppData\Local\Programs\Python\Python38-32\bin
[12:51:51 PM] [General] [Info] C:\Users\neyyu\AppData\Local\Microsoft\WindowsApps
[12:51:51 PM] [General] [Info] C:\Users\neyyu\AppData\Local\Microsoft\WindowsApps\bin
[12:51:51 PM] [General] [Info] C:\Users\neyyu\AppData\Local\Yarn\bin
[12:51:51 PM] [General] [Info] C:\Users\neyyu\AppData\Local\Android\Sdk\platform-tools
[12:51:51 PM] [General] [Info] C:\Users\neyyu\AppData\Local\Android\Sdk\platform-tools\bin
[12:51:51 PM] [General] [Info] D:\flutter\bin
[12:51:51 PM] [General] [Info] D:\Microsoft VS Code\bin
[12:51:51 PM] [General] [Info] C:\Users\neyyu\AppData\Roaming\npm
[12:51:51 PM] [General] [Info] C:\Users\neyyu\AppData\Roaming\npm\bin
[12:51:51 PM] [General] [Info] C:\Users\neyyu\AppData\Local\Microsoft\WindowsApps
[12:51:51 PM] [General] [Info] C:\Users\neyyu\AppData\Local\Microsoft\WindowsApps\bin
[12:51:51 PM] [General] [Info] Found at:
[12:51:51 PM] [General] [Info] Candidate paths to be post-filtered:
[12:51:51 PM] [General] [Info] Returning SDK path undefined for flutter.bat
[12:51:51 PM] [General] [Info] Searching for dart.exe
[12:51:51 PM] [General] [Info] Looking for dart.exe in:
[12:51:51 PM] [General] [Info] C:\WINDOWS\system32
[12:51:51 PM] [General] [Info] C:\WINDOWS\system32\bin
[12:51:51 PM] [General] [Info] C:\WINDOWS
[12:51:51 PM] [General] [Info] C:\WINDOWS\bin
[12:51:51 PM] [General] [Info] C:\WINDOWS\System32\Wbem
[12:51:51 PM] [General] [Info] C:\WINDOWS\System32\Wbem\bin
[12:51:51 PM] [General] [Info] C:\WINDOWS\System32\WindowsPowerShell\v1.0\
[12:51:51 PM] [General] [Info] C:\WINDOWS\System32\WindowsPowerShell\v1.0\bin
[12:51:51 PM] [General] [Info] C:\WINDOWS\System32\OpenSSH\
[12:51:51 PM] [General] [Info] C:\WINDOWS\System32\OpenSSH\bin
[12:51:51 PM] [General] [Info] D:\Git\cmd
[12:51:51 PM] [General] [Info] D:\Git\cmd\bin
[12:51:51 PM] [General] [Info] C:\Program Files (x86)\Yarn\bin\
[12:51:51 PM] [General] [Info] C:\ProgramData\chocolatey\bin
[12:51:51 PM] [General] [Info] C:\Program Files\Java\jdk1.8.0_211\bin
[12:51:51 PM] [General] [Info] C:\Program Files\nodejs\
[12:51:51 PM] [General] [Info] C:\Program Files\nodejs\bin
[12:51:51 PM] [General] [Info] D:\MPLab\MPLAB C32 Suite\bin
[12:51:51 PM] [General] [Info] C:\Program Files\PuTTY\
[12:51:51 PM] [General] [Info] C:\Program Files\PuTTY\bin
[12:51:51 PM] [General] [Info] C:\Users\neyyu\AppData\Local\Programs\Python\Python38-32\Scripts\
[12:51:51 PM] [General] [Info] C:\Users\neyyu\AppData\Local\Programs\Python\Python38-32\Scripts\bin
[12:51:51 PM] [General] [Info] C:\Users\neyyu\AppData\Local\Programs\Python\Python38-32\
[12:51:51 PM] [General] [Info] C:\Users\neyyu\AppData\Local\Programs\Python\Python38-32\bin
[12:51:51 PM] [General] [Info] C:\Users\neyyu\AppData\Local\Microsoft\WindowsApps
[12:51:51 PM] [General] [Info] C:\Users\neyyu\AppData\Local\Microsoft\WindowsApps\bin
[12:51:51 PM] [General] [Info] C:\Users\neyyu\AppData\Local\Yarn\bin
[12:51:51 PM] [General] [Info] C:\Users\neyyu\AppData\Local\Android\Sdk\platform-tools
[12:51:51 PM] [General] [Info] C:\Users\neyyu\AppData\Local\Android\Sdk\platform-tools\bin
[12:51:51 PM] [General] [Info] D:\flutter\bin
[12:51:51 PM] [General] [Info] D:\Microsoft VS Code\bin
[12:51:51 PM] [General] [Info] C:\Users\neyyu\AppData\Roaming\npm
[12:51:51 PM] [General] [Info] C:\Users\neyyu\AppData\Roaming\npm\bin
[12:51:51 PM] [General] [Info] C:\Users\neyyu\AppData\Local\Microsoft\WindowsApps
[12:51:51 PM] [General] [Info] C:\Users\neyyu\AppData\Local\Microsoft\WindowsApps\bin
[12:51:51 PM] [General] [Info] Found at:
[12:51:51 PM] [General] [Info] Candidate paths to be post-filtered:
[12:51:51 PM] [General] [Info] Returning SDK path undefined for dart.exe