【问题标题】:Flutter package build error "swift file not found"Flutter 包构建错误“找不到 swift 文件”
【发布时间】:2020-01-04 21:46:08
【问题描述】:

我正在尝试获取软件包 geoflutterfire: ^2.0.2 但是当我运行它时:我得到这个错误(在 ios 模拟器上)。

 ** BUILD FAILED **


Xcode's output:
↳
    warning: The iOS Simulator deployment target is set to 4.3, but the range of supported deployment target versions for this platform is 8.0 to 12.4.99. (in target 'nanopb')
    warning: The iOS Simulator deployment target is set to 4.3, but the range of supported deployment target versions for this platform is 8.0 to 12.4.99. (in target 'FMDB')
    warning: The iOS Simulator deployment target is set to 7.0, but the range of supported deployment target versions for this platform is 8.0 to 12.4.99. (in target 'BoringSSL-GRPC')
    warning: The iOS Simulator deployment target is set to 7.0, but the range of supported deployment target versions for this platform is 8.0 to 12.4.99. (in target 'GTMSessionFetcher')
    warning: The iOS Simulator deployment target is set to 7.0, but the range of supported deployment target versions for this platform is 8.0 to 12.4.99. (in target 'Protobuf')
    warning: The iOS Simulator deployment target is set to 7.0, but the range of supported deployment target versions for this platform is 8.0 to 12.4.99. (in target 'gRPC-C++-gRPCCertificates-Cpp')
    warning: The iOS Simulator deployment target is set to 7.0, but the range of supported deployment target versions for this platform is 8.0 to 12.4.99. (in target 'gRPC-Core')
    warning: The iOS Simulator deployment target is set to 5.0, but the range of supported deployment target versions for this platform is 8.0 to 12.4.99. (in target 'leveldb-library')
    warning: The iOS Simulator deployment target is set to 7.0, but the range of supported deployment target versions for this platform is 8.0 to 12.4.99. (in target 'gRPC-C++')
    warning: The iOS Simulator deployment target is set to 7.0, but the range of supported deployment target versions for this platform is 8.0 to 12.4.99. (in target 'Flutter')
    warning: The iOS Simulator deployment target is set to 7.0, but the range of supported deployment target versions for this platform is 8.0 to 12.4.99. (in target 'GoogleSignIn')
    warning: The iOS Simulator deployment target is set to 6.0, but the range of supported deployment target versions for this platform is 8.0 to 12.4.99. (in target 'Reachability')
    warning: The iOS Simulator deployment target is set to 4.3, but the range of supported deployment target versions for this platform is 8.0 to 12.4.99. (in target 'google_sign_in')
    /Users/kareldebedts/developer/flutter/.pub-cache/hosted/pub.dartlang.org/geoflutterfire-2.0.3+5/ios/Classes/GeoflutterfirePlugin.m:2:9: fatal error: 'geoflutterfire/geoflutterfire-Swift.h' file not found
    #import <geoflutterfire/geoflutterfire-Swift.h>
            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    1 error generated.
    Runner-cqaojqsfhatpprdzwzvknsqozsgn
    note: Using new build systemnote: Planning buildnote: Constructing build description

这真的很奇怪,因为没有那个包,一切正常。 geoflutterfire 包有替代品吗?或修复以使软件包工作?

感谢您的时间和精力!

这是我的 pubspec yaml

  cupertino_icons: ^0.1.2
  firebase_core: ^0.4.0
  firebase_auth: ^0.11.1+12
  google_sign_in: ^4.0.4
  flutter_facebook_login: ^2.0.1
  cloud_firestore: ^0.12.7+1
  shared_preferences: ^0.5.3+4
  geolocator: ^5.1.1+1
  url_launcher: ^5.1.2
  rflutter_alert: ^1.0.3
  font_awesome_flutter: ^8.5.0
  flutter_picker: ^1.0.13
  uuid: 2.0.1
  image_picker: ^0.6.1
  path_provider: ^1.2.0
  image: ^2.1.4
  firebase_storage: ^3.0.4
  flutter_datetime_picker: ^1.2.5
  intl: ^0.15.8
  native_contact_picker: ^0.0.6
  flutter_spinkit: ^4.0.0
  transparent_image: ^1.0.0
  connectivity: ^0.4.3+7
  flare_splash_screen: ^2.1.3
  cached_network_image: ^1.1.1
  algolia: ^0.1.6+1
  http: ^0.12.0+2
  cloud_functions: ^0.4.1+1
  firebase_messaging: ^5.0.2
  back_button_interceptor: ^4.1.1
  avatar_glow: ^1.0.0
  geoflutterfire: ^2.0.2

【问题讨论】:

    标签: ios xcode firebase flutter


    【解决方案1】:

    对于遇到相同问题的每个人。 (非常令人沮丧,因为这是一个很棒的包)我已经添加了

    使用_frameworks!

    到 ios/podfile

    它可以工作,不确定它是否会保持这种方式,将来会有问题....

    【讨论】:

      猜你喜欢
      • 2021-05-04
      • 2021-03-06
      • 1970-01-01
      • 2021-05-20
      • 2021-06-28
      • 1970-01-01
      • 2021-11-18
      • 2021-07-21
      • 2021-03-26
      相关资源
      最近更新 更多