【问题标题】:Flutter build error: Error connecting to the service protocol: failed to connect to http://127.0.0.1:51234/v9-zOlh23aE=/Flutter 构建报错:连接服务协议时出错:无法连接到 http://127.0.0.1:51234/v9-zOlh23aE=/
【发布时间】:2021-05-01 13:50:00
【问题描述】:

我的应用构建失败,出现以下构建错误:

√ Built build\app\outputs\flutter-apk\app-debug.apk.

D/FlutterLocationService(29765): Creating service.

D/FlutterLocationService(29765): Binding to location service.

Error connecting to the service protocol: failed to connect to http://127.0.0.1:51234/v9-zOlh23aE=/

Exited (sigterm)

这发生在 pub 升级之后。

【问题讨论】:

标签: flutter


【解决方案1】:

虽然这个问题看起来很常见,可能是由各种情况引起的,也许你应该检查是否选择了SDK。

在 Android Studio 中,您可以在 File -> Project Structure -> Project SDK 中设置 SDK,这适用于我的情况。

或者你也可以试试flutter clean && flutter upgrade

【讨论】:

    猜你喜欢
    • 2020-09-14
    • 2020-09-02
    • 2021-10-24
    • 2023-03-25
    • 2019-09-29
    • 1970-01-01
    • 2020-06-06
    • 2019-05-24
    • 2018-10-23
    相关资源
    最近更新 更多