[英]Why I am getting this Program 'flutter.bat' failed to run: The system cannot find the file specifiedAt line:1 char:1
I am trying to create a flutter application in Visual Studio code which raising the above error.我正在尝试在 Visual Studio 代码中创建一个 flutter 应用程序,这会引发上述错误。
Sound to me like you have not installed flutter SDK properly or VS code is having problems finding the SDk path.对我来说听起来像您没有正确安装 flutter SDK 或 VS 代码在查找 SDk 路径时遇到问题。 it can be any of those things.
它可以是任何这些东西。
it seems you have not accepted all android licenses.看来您还没有接受所有 android 许可证。 try reinstalling android SDK and make sure to accept all android licenses.
尝试重新安装 android SDK 并确保接受所有 android 许可证。 then run
然后运行
flutter doctor
and see if it passes all checks看看它是否通过了所有检查
Since you have installed Flutter for the first time, you need to accept Android License to start building with Flutter.由于您是第一次安装 Flutter,您需要接受 Android 许可证才能开始使用 Flutter 进行构建。
To accept the license,要接受许可,
flutter doctor --android-licenses
flutter doctor --android-licenses
y
to accept every license.y
接受每个许可证。 This may be because your cmd.exe file located in system32 has been corrupted or lost.这可能是因为您位于 system32 中的 cmd.exe 文件已损坏或丢失。 Try to get the cmd.exe file from another system and paste it into the desired location then execute if there is a flutter in your system or not.
尝试从另一个系统中获取 cmd.exe 文件并将其粘贴到所需的位置,然后在您的系统中是否存在 flutter 时执行。 This has solved the problem in my case.
这解决了我的问题。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.