简体   繁体   English

Flutter 运行未完成

[英]Flutter run don't finish

In a new flutter project, I run flutter doctor command and it says everything is okay.在一个新的 flutter 项目中,我运行 flutter doctor 命令,它说一切正常。 When I try to run my app it doesn't finish or error out.当我尝试运行我的应用程序时,它没有完成或出错。 It just says running.它只是说运行。 What should I do.我该怎么办。

if everything is right with flutter doctor command, your app is probably initializing gradle which took some time before the app is properly running.如果flutter doctor命令一切正常,则您的应用程序可能正在初始化 gradle,这在应用程序正常运行之前需要一些时间。

Run flutter run -v and you will see output telling you that the app is initializing gradle运行flutter run -v ,你会看到输出告诉你应用程序正在初始化 gradle

This is how it looks in the Run window:这是它在“运行”窗口中的外观:

Launching lib\\main.dart on Android SDK built for x86 in debug mode... Initializing gradle...

give it sometime to download gradle and it will run normally, of course this won't be an issue for future runs but always run flutter with the -v option给它一些时间下载 gradle,它会正常运行,当然这不会成为未来运行的问题,但始终使用-v选项运行 flutter

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

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