在 pubspec.yaml 中添加 Google Maps 包后,Flutter iOS 应用程序无法构建

exc*_*ter 5 xcode google-maps ios dart flutter

在 pubspec.yaml 中添加谷歌地图包后,Flutter iOS 应用程序无法构建删除谷歌地图包后,应用程序构建良好 ( https://pub.dev/packages/google_maps_flutter ) 请帮忙!

错误日志:

在调试模式下在 iPhone 8 Plus 上启动 lib/main.dart...

运行 pod install... 7.2s 运行 Xcode build...

??编译、链接和签名... 4.0s Xcode 构建完成。49.6s 无法构建 iOS 应用程序 Xcode 构建的错误输出:?2020-08-14 10:36:17.831 xcodebuild[5254:93706] 警告:“Objective-C/TOCropViewController/Models/TOActivityCroppedImageProvider.h”的文件引用是多个组(“TOCropViewController”和“TOCropViewController”)的成员; 这表明一个畸形的项目。只会保留其中一个组中的成员资格(但目标中的成员资格不受影响)。如果您想在多个组中引用同一个文件,请添加另一个对同一路径的引用。2020-08-14 10:36:17.831 xcodebuild[5254:93706] 警告:“Objective-C/TOCropViewController/Views/TOCropOverlayView.xml”的文件参考。请添加对同一路径的另一个引用。2020-08-14 10:36:17.831 xcodebuild[5254:93706] 警告:“Objective-C/TOCropViewController/Views/TOCropScrollView.h”的文件引用是多个组(“TOCropViewController”和“TOCropViewController”)的成员; 这表明一个畸形的项目。只会保留其中一个组中的成员资格(但目标中的成员资格不受影响)。如果您想在多个组中引用同一个文件,请添加另一个对同一路径的引用。2020-08-14 10:36:17.831 xcodebuild[5254:93706] 警告:“Objective-C/TOCropViewController/Views/TOCropToolbar.h”的文件引用是多个组(“TOCropViewController”和“TOCropViewController”)的成员; 这表明一个畸形的项目。只会保留其中一个组中的成员资格(但目标中的成员资格不受影响)。如果您想在多个组中引用同一个文件,请添加另一个对同一路径的引用。2020-08-14 10:36:17.831 xcodebuild[5254:93706] 警告:“Objective-C/TOCropViewController/Views/TOCropView.h”的文件引用是多个组(“TOCropViewController”和“TOCropViewController”)的成员; 这表明一个畸形的项目。只会保留其中一个组中的成员资格(但目标中的成员资格不受影响)。如果您想在多个组中引用同一个文件,请添加另一个对同一路径的引用。2020-08-14 10:36:17.831 xcodebuild[5254:93706] 警告:“的文件参考” 如果您想在多个组中引用同一个文件,请添加另一个对同一路径的引用。** 构建失败 **

Xcode 的输出:/Users/chrisflection/Development/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_pdfview-1.0.3+2/io s/Classes/FlutterPDFView.m:25:5: 警告: 'FLTPDFViewController' 只是在 iOS 11.0 或更高版本上可用 [-Wunguarded-availability-new] FLTPDFViewController* pdfviewController = [[FLTPDFViewController alloc] initWithFrame:frame ^~~~~~~~~~~~~~~~~~~~~~ 在包含的文件中/Users/chrisflection/Development/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_pdfview-1.0.3+2/io s/Classes/FlutterPDFView.m:4:/Users/chrisflection/Development/flutter/ .pub-cache/hosted/pub.dartlang.org/flutter_pdfview-1.0.3+2/io s/Classes/FlutterPDFView.h:11:12: 注意:'FLTPDFViewController' 已被标记为在 iOS 11.0 中引入,但部署目标是 iOS 9.0.0 @interface FLTPDFViewController : NSObject < 0.3+2/io s/Classes/FlutterPDFView.m:4:/Users/chrisflection/Development/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_pdfview-1.0.3+2/io s/Classes/ FlutterPDFView.h:11:12: 注意:'FLTPDFViewController' 已经被标记为在 iOS 11.0 中引入,但部署目标是 iOS 9.0.0 @interface FLTPDFViewController : NSObject <FlutterPlatformView, PDFViewDelegate> ^ /Users/chrisflection/Development /flutter/.pub-cache/hosted/pub.dartlang.org/flutter_pdfview-1.0.3+2/io s/Classes/FlutterPDFView.m:25:49:注意:将“FLTPDFViewController”括在@available检查中以静音这个警告 FLTPDFViewController* pdfviewController = [[FLTPDFViewController alloc] initWithFrame:frame ^~~~~~~~~~~~~~~~~~~~~~ 生成了 2 个警告。编号:目标操作系统版本不支持在 __ZN9GMSx_absl9GMSx_Cord9InlineRep10AppendTreeEPNS_13cord_internal12GMSx_CordRepE 中使用线程局部变量,用于架构 x86_64 clang:错误:链接器命令失败,退出代码为 1(使用 -v 查看调用)注意:在构建系统中使用新目标注意:规划构建说明:构建构建描述警告:将架构 armv7 映射到 i386。确保为 iOS Simulator 平台正确配置了此目标的架构和有效架构构建设置。(在项目“Pods”的目标“flutter_pdfview”中)警告:将架构 arm64 映射到 x86_64。确保为 iOS Simulator 平台正确配置了此目标的架构和有效架构构建设置。(在目标'flutter_pdfview' 签名和功能的功能可能无法正常运行,因为其权利使用占位符团队 ID。要解决此问题,请在 Runner 编辑器中选择一个开发团队。(在项目“Runner”的目标“Runner”中)

无法为模拟器构建应用程序。在 iPhone 8 Plus 上启动应用程序时出错。

这是我的 pubspec.yaml:

dependencies:
  flutter:
    sdk: flutter

  # The following adds the Cupertino Icons font to your application.
  # Use with the CupertinoIcons class for iOS style icons.
  cupertino_icons: ^0.1.3
  image_cropper: ^1.2.3
  table_calendar: ^2.2.3
  substring_highlight: ^0.1.2
  intl: ^0.16.1
  shared_preferences: ^0.5.4+5
  image_picker: ^0.6.7
  mime_type: ^0.3.2
  flutter_pdfview: ^1.0.0+10
  path_provider: ^1.6.5
  pdf_flutter: ^1.1.2
  http: ^0.12.0+4
  multi_image_picker: ^4.6.9
  outline_material_icons: ^0.1.1
  fading_edge_scrollview: ^1.1.4
  sticky_headers: ^0.1.8+1
  flutter_tindercard: ^0.1.9
  google_maps_flutter: ^0.5.30
Run Code Online (Sandbox Code Playgroud)

Oma*_*att 0

我已在我的应用程序中添加了 google_maps_flutter: ^0.5.30,但在 iOS 上运行该应用程序时没有遇到任何问题。我建议运行flutter clean以清除构建缓存,然后尝试再次运行应用程序。如果仍有问题,请运行flutter doctor以检查是否有任何错误或警告。