连接到 VM 服务的时间比预期的要长 [英] Connecting to VM services is taking longer than expected

查看:39
本文介绍了连接到 VM 服务的时间比预期的要长的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在运行 flutter 应用程序时遇到错误,它结束了,但它被 VM 服务卡住了,我有 GoogleService-Info.plist 并且一切正常,现在有人可能仍然是什么问题?

I'm having an error while running a flutter app, it comes to the end but it gets stuck with VM Services, i have the GoogleService-Info.plist and everything okay, anybody now what might still be the issue?

推荐答案

您可以尝试在 main.dart 文件中添加 Firebase.initializeApp().这个解决方案对我有用.

You can try adding Firebase.initializeApp() in the main.dart file. This solution worked for me.

如果您在项目中找不到 FirebaseApp,请在您的 pub spec.yaml 中添加 firebase_core.

If you cannot find FirebaseApp in your project then please add firebase_core in your pub spec.yaml.

这篇关于连接到 VM 服务的时间比预期的要长的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆