我在一家名为Ffltter的应用程序中工作.Android运行良好,但在iOS中没有.我需要一些帮助才能在iOS手机上运行这个.我正在使用lib:google_maps_flutter: ^0.5.27+3firebase_ml_vision: ^0.9.3+8.Xcode 11.4.1和Mac os Catalina 10.15.4.有人知道怎么解决这个问题.我还没找到.

flutter doctor
[✓] Flutter (Channel stable, v1.17.0, on Mac OS X 10.15.4 19E287, locale en-BR)
[✓] Android toolchain - develop for Android devices (Android SDK version 28.0.3)
[✓] Xcode - develop for iOS and macOS (Xcode 11.4.1)
[✓] Android Studio (version 3.6)
[✓] VS Code (version 1.45.0)
[✓] Connected device (1 available)

• No issues found!

日志(log)错误如下:

Undefined symbols for architecture x86_64:
  "_OBJC_CLASS_$_GMSPolyline", referenced from:
      objc-class-ref in google_maps_flutter(GoogleMapPolylineController.o)
  "_OBJC_CLASS_$_FIRVisionOnDeviceImageLabelerOptions", referenced from:
      objc-class-ref in firebase_ml_vision(ImageLabeler.o)
  "_FIRFaceLandmarkTypeLeftEar", referenced from:
      ___39-[FaceDetector handleDetection:result:]_block_invoke in firebase_ml_vision(FaceDetector.o)
  "_FIRFaceLandmarkTypeMouthLeft", referenced from:
      ___39-[FaceDetector handleDetection:result:]_block_invoke in firebase_ml_vision(FaceDetector.o)
  "_FIRFaceLandmarkTypeRightCheek", referenced from:
      ___39-[FaceDetector handleDetection:result:]_block_invoke in firebase_ml_vision(FaceDetector.o)
  "_FIRFaceLandmarkTypeNoseBase", referenced from:
      ___39-[FaceDetector handleDetection:result:]_block_invoke in firebase_ml_vision(FaceDetector.o)
  "_FIRFaceLandmarkTypeRightEye", referenced from:
      ___39-[FaceDetector handleDetection:result:]_block_invoke in firebase_ml_vision(FaceDetector.o)
  "_OBJC_CLASS_$_GMSMarker", referenced from:
      objc-class-ref in google_maps_flutter(GoogleMapMarkerController.o)
  "_FIRFaceLandmarkTypeMouthRight", referenced from:
      ___39-[FaceDetector handleDetection:result:]_block_invoke in firebase_ml_vision(FaceDetector.o)
  "_FIRFaceContourTypeLeftEye", referenced from:
      ___39-[FaceDetector handleDetection:result:]_block_invoke in firebase_ml_vision(FaceDetector.o)
  "_FIRFaceContourTypeRightEye", referenced from:
      ___39-[FaceDetector handleDetection:result:]_block_invoke in firebase_ml_vision(FaceDetector.o)
  "_FIRFaceContourTypeLowerLipTop", referenced from:
      ___39-[FaceDetector handleDetection:result:]_block_invoke in firebase_ml_vision(FaceDetector.o)
  "_OBJC_CLASS_$_GMSServices", referenced from:
      objc-class-ref in AppDelegate.o
  "_FIRFaceContourTypeNoseBottom", referenced from:
      ___39-[FaceDetector handleDetection:result:]_block_invoke in firebase_ml_vision(FaceDetector.o)
  "_FIRFaceLandmarkTypeLeftCheek", referenced from:
      ___39-[FaceDetector handleDetection:result:]_block_invoke in firebase_ml_vision(FaceDetector.o)
  "_FIRFaceLandmarkTypeLeftEye", referenced from:
      ___39-[FaceDetector handleDetection:result:]_block_invoke in firebase_ml_vision(FaceDetector.o)
  "_OBJC_CLASS_$_GMSMapStyle", referenced from:
      objc-class-ref in google_maps_flutter(GoogleMapController.o)
  "_FIRFaceContourTypeRightEyebrowTop", referenced from:
      ___39-[FaceDetector handleDetection:result:]_block_invoke in firebase_ml_vision(FaceDetector.o)
  "_OBJC_CLASS_$_GMSPolygon", referenced from:
      objc-class-ref in google_maps_flutter(GoogleMapPolygonController.o)
  "_FIRFaceContourTypeUpperLipTop", referenced from:
      ___39-[FaceDetector handleDetection:result:]_block_invoke in firebase_ml_vision(FaceDetector.o)
  "_FIRFaceContourTypeRightEyebrowBottom", referenced from:
      ___39-[FaceDetector handleDetection:result:]_block_invoke in firebase_ml_vision(FaceDetector.o)
  "_FIRFaceContourTypeLeftEyebrowBottom", referenced from:
      ___39-[FaceDetector handleDetection:result:]_block_invoke in firebase_ml_vision(FaceDetector.o)
  "_FIRFaceLandmarkTypeRightEar", referenced from:
      ___39-[FaceDetector handleDetection:result:]_block_invoke in firebase_ml_vision(FaceDetector.o)
  "_FIRFaceContourTypeUpperLipBottom", referenced from:
      ___39-[FaceDetector handleDetection:result:]_block_invoke in firebase_ml_vision(FaceDetector.o)
  "_OBJC_CLASS_$_FIRVisionCloudImageLabelerOptions", referenced from:
      objc-class-ref in firebase_ml_vision(ImageLabeler.o)
  "_OBJC_CLASS_$_GMSCameraPosition", referenced from:
      objc-class-ref in google_maps_flutter(GoogleMapController.o)
  "_kGMSMinZoomLevel", referenced from:
      _InterpretMapOptions in google_maps_flutter(GoogleMapController.o)
  "_OBJC_CLASS_$_GMSMapView", referenced from:
      objc-class-ref in google_maps_flutter(GoogleMapController.o)
  "_OBJC_CLASS_$_GMSMutablePath", referenced from:
      objc-class-ref in google_maps_flutter(GoogleMapPolygonController.o)
      objc-class-ref in google_maps_flutter(GoogleMapPolylineController.o)
  "_OBJC_CLASS_$_GMSCircle", referenced from:
      objc-class-ref in google_maps_flutter(GoogleMapCircleController.o)
  "_FIRFaceLandmarkTypeMouthBottom", referenced from:
      ___39-[FaceDetector handleDetection:result:]_block_invoke in firebase_ml_vision(FaceDetector.o)
  "_OBJC_CLASS_$_GMSCoordinateBounds", referenced from:
      objc-class-ref in google_maps_flutter(GoogleMapController.o)
  "_OBJC_CLASS_$_GMSCameraUpdate", referenced from:
      objc-class-ref in google_maps_flutter(GoogleMapController.o)
  "_FIRFaceContourTypeLeftEyebrowTop", referenced from:
      ___39-[FaceDetector handleDetection:result:]_block_invoke in firebase_ml_vision(FaceDetector.o)
  "_OBJC_CLASS_$_FIRVision", referenced from:
      objc-class-ref in firebase_ml_vision(FLTFirebaseMlVisionPlugin.o)
  "_OBJC_CLASS_$_FIRVisionFaceDetectorOptions", referenced from:
      objc-class-ref in firebase_ml_vision(FaceDetector.o)
  "_kGMSMaxZoomLevel", referenced from:
      _InterpretMapOptions in google_maps_flutter(GoogleMapController.o)
  "_FIRFaceContourTypeAll", referenced from:
      ___39-[FaceDetector handleDetection:result:]_block_invoke in firebase_ml_vision(FaceDetector.o)
  "_OBJC_CLASS_$_FIRVisionBarcodeDetectorOptions", referenced from:
      objc-class-ref in firebase_ml_vision(BarcodeDetector.o)
  "_OBJC_CLASS_$_FIRApp", referenced from:
      objc-class-ref in firebase_ml_vision(FLTFirebaseMlVisionPlugin.o)
  "_FIRFaceContourTypeLowerLipBottom", referenced from:
      ___39-[FaceDetector handleDetection:result:]_block_invoke in firebase_ml_vision(FaceDetector.o)
  "_OBJC_CLASS_$_FIRVisionImage", referenced from:
      objc-class-ref in firebase_ml_vision(FLTFirebaseMlVisionPlugin.o)
  "_FIRFaceContourTypeFace", referenced from:
      ___39-[FaceDetector handleDetection:result:]_block_invoke in firebase_ml_vision(FaceDetector.o)
  "_FIRFaceContourTypeNoseBridge", referenced from:
      ___39-[FaceDetector handleDetection:result:]_block_invoke in firebase_ml_vision(FaceDetector.o)
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

推荐答案

错误可能出现在某些XCode项目文件上,请try :

  1. 备份您的项目.
  2. 运行这个命令

    挥动干净&;&;\ RM IOS/Podfile IOS/Podfile.lock pubspec.lock&;&;\ rm-RF IOS/Pods IOS/Runner.xcworkspace&;&;\ Flutter 运行

Reference

Flutter相关问答推荐

ShaderMask上的文本渐变问题

Box约束强制无限高:SizedBox. Expand()

为什么要在值列表中两次放入空安全性

Android Studio中的Ffltter&;Couchbase:进程C:/Program Files/Git/bin/bash以非零退出值35结束

CMakeLists.txt处的CMake错误:3(项目)找不到指定的Visual Studio实例

blocTest错误:没有从`when()`中调用方法存根

如何使页面浏览量达到活动页面所要求的高度?

有没有可能不在BlocBuilder中重新构建内容?

如果我使用搜索栏,如何在嵌套滚动视图中停止自动滚动?

Flutter 火焰相机抖动已弃用

在参数为空时保持命名参数的默认值

Freezed+BLoc 如何从 BLoc Listener 查看当前状态和特定状态的变量

如何使这种相机叠加在Flutter 中?

从子类调用超类的超方法

Flutter - 定义按钮的优雅方式

使用 hydrad_bloc 的预览包

在 Flutter 应用程序中全局使用 assets 文件夹

Flutter ListView builder 未使用新数据更新

在列表视图Flutter 中 Select 下一个单选按钮时单选按钮更改

我想将我的模型类对象发送到下一个屏幕之前我这样做首先我在第二个屏幕中声明对象