ios - flutter 错误 : no such module 'GoogleMaps'

标签 ios google-maps flutter

我在一个客户购买的项目中工作。该项目是 Fluxstore。使用 Flutter 构建的电子商务。

我可以在 Android 中运行该项目(模拟器和设备=)。但是iOS没有运行。我收到以下错误:

Launching lib/main.dart on iPhone 11 in debug mode...
Running pod install...
Running Xcode build...
Xcode build done.                                           138,6s
Failed to build iOS app
Could not build the application for the simulator.
Error launching application on iPhone 11.
Error output from Xcode build:
↳
** BUILD FAILED **


Xcode's output:
↳
/Users/user./projects/project/ios/Runner/AppDelegate.swift:3:8: error: no such module 'GoogleMaps'
import GoogleMaps
       ^
note: Using new build system
note: Building targets in parallel
note: Planning build
note: Constructing build description

我在 Internet 上查找了此问题的解决方案,但没有任何效果。有人可以帮帮我吗?

最佳答案

删除所有pod文件。运行 flutter clean。然后转到 iOS 文件夹并运行 pod init。它创建一个 pod 文件。在 target 'Runner' do 之前添加 pod 'GoogleMaps'

我分享我的pod文件代码

# Uncomment the next line to define a global platform for your project
# platform :ios, '9.0'
pod 'Firebase/Analytics'
pod 'GoogleMaps'
# add pods for any other desired Firebase products
# https://firebase.google.com/docs/ios/setup#available-pods

target 'Runner' do
  # Comment the next line if you don't want to use dynamic frameworks
  
  # Comment the next line if you don't want to use dynamic frameworks
  use_frameworks!

  # Pods for Runner

end

关于ios - flutter 错误 : no such module 'GoogleMaps' ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/63453018/

相关文章:

flutter - 如何从Blogger API在我的flutter应用程序中加载 “image”

ios - 如何在最后一个 View Controller 上关闭三个 View Controller

flutter - 在使用 flutter_bloc 库发送事件之前等待一些结果

flutter - 类型 'List<dynamic>'不是 'Map<String, dynamic>'类型的子类型

java - 如何为 Android (java) 配置 Google Maps Distance Matrix API

google-maps - 谷歌是如何得到 map 上邮政编码的大纲的?

android - 无法从android中的谷歌地图中心获取latlong

ios - 无法在 UITextView 中使 URL 可点击

ios - 将 UIImage 的 NSData 表示形式转换为 NSImage

iphone - TableView :cellForRowAtIndexPath: only returning one custom uitableviewcell