简体   繁体   English

当我使用移动模拟器时无法构建 flutter

[英]Can't build flutter when I use mobile Emulator

I am going to build my flutter project using the mobile emulator, but it shows: ":\AndroidStudioProjects\flutter' is not recognized as an internal or external command,operable program or batch file.Exception: Gradle task assembleDebug failed with exit code 1"我打算使用移动模拟器构建我的 flutter 项目,但它显示:“:\AndroidStudioProjects\flutter' 未被识别为内部或外部命令、可运行程序或批处理文件。异常:Gradle 任务 assembleDebug 失败,退出代码为 1 “

But if I run it with the web, no errors will pop up.但是如果我用 web 运行它,就不会弹出任何错误。 However, no content shows in the web tab.但是,web 选项卡中没有显示任何内容。 Here is the flutter doctor:[√] Flutter (Channel stable, 2.5.3, on Microsoft Windows [Version 10.0.19042.1586])[√] Android toolchain - develop for Android devices (Android SDK version 33.0.0-rc1)[√] Chrome - develop for the web[√] Android Studio (version 2021.1)[√] Connected device (3 available).这是flutter医生:[√] Flutter(频道稳定,2.5.3,Microsoft Windows [版本10.0.19042.1586) ] Chrome - 为网络开发[√] Android Studio(版本 2021.1)[√] 已连接的设备(可用 3 个)。

So, how could I solve it?那么,我该如何解决呢?

You need to add the path to your system environment.您需要将路径添加到您的系统环境。 Because your system is not able to find the folder where you have installed Flutter in your system.因为您的系统无法找到您在系统中安装 Flutter 的文件夹。 for more details更多细节

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM