尝试运行并构建到iPhone仿真器时出现Flutter Xcode致命错误

时间:2020-01-21 10:47:56

标签: ios xcode flutter app-store

我正在尝试将我在Flutter中编写的应用程序构建到iOS。不幸的是,有一个错误,构建不会让步。错误如下。我该如何解决?

我已将Firebase添加到我的应用程序中,该应用程序可以修复以前的错误,但仍然存在。

Xcode build done.                                           23.0s
Failed to build iOS app
Error output from Xcode build:
↳
    ** BUILD FAILED **


Xcode's output:
↳
    /Users/USERNAME/Desktop/Flutter/SyncShop APP/syncshop/ios/Runner/GeneratedPluginRegistrant.m:10:9: fatal error: module 'connectivity' not
    found
    @import connectivity;
     ~~~~~~~^~~~~~~~~~~~
    1 error generated.
    note: Using new build system
    note: Planning build
    note: Constructing build description

Could not build the application for the simulator.
Error launching application on iPhone 11 Pro Max.

2 个答案:

答案 0 :(得分:0)

通过终端在项目目录文件夹下运行此命令

rm ios/Podfile && flutter build ios

答案 1 :(得分:-1)

我更改了此文件

pubspec.yaml->连通性:0.4.4 + 1 Podfile-> platform:ios,'9.0'

flutter clean
flutter run