【发布时间】:2021-05-21 03:52:06
【问题描述】:
我在 iOS 模拟器上启动 Flutter 应用时遇到问题。这个问题似乎与 localhost 连接或 Firebase 有关,我无法判断。从下面的错误来看,但我无法找到解决方法。
我正在运行 MacOS BigSur。
应用程序在 Android 模拟器上启动并运行良好。
以下是 Android Studio 终端的错误输出:
Running pod install...
Running Xcode build...
Xcode build done. 716.3s
Configuring the default Firebase app...
Configured the default Firebase app __FIRAPP_DEFAULT.
Connecting to the VM Service is taking longer than expected...
Still attempting to connect to the VM Service...
If you do NOT see the Flutter application running, it might have crashed. The device logs (e.g. from adb or XCode) might have more details.
If you do see the Flutter application running on the device, try re-running with --host-vmservice-port to use a specific port known to be available.
Exception attempting to connect to the VM Service: SocketException: OS Error: Connection refused, errno = 61, address = 127.0.0.1, port = 57172
This was attempt #50. Will retry in 0:00:01.600000.
Exception attempting to connect to the VM Service: SocketException: OS Error: Connection refused, errno = 61, address = 127.0.0.1, port = 57265
This was attempt #100. Will retry in 0:00:01.600000.
Exception attempting to connect to the VM Service: SocketException: OS Error: Connection refused, errno = 61, address = 127.0.0.1, port = 57356
This was attempt #150. Will retry in 0:00:01.600000.
Exception attempting to connect to the VM Service: SocketException: OS Error: Connection refused, errno = 61, address = 127.0.0.1, port = 57454
This was attempt #200. Will retry in 0:00:01.600000.
Exception attempting to connect to the VM Service: SocketException: OS Error: Connection refused, errno = 61, address = 127.0.0.1, port = 57586
This was attempt #250. Will retry in 0:00:01.600000.
我尝试使用一些在线解决方案来解决这个问题,例如:Errors Launching Flutter app in iOS Simualtor
但这只是从堆栈跟踪(Android Studio 终端)中删除了错误,并且应用程序仍然崩溃。
有人可以帮忙吗?谢谢!
【问题讨论】:
-
@JanviPatel 还没有,还在尝试!
标签: android ios swift flutter flutter-test