我在一个客户购买的项目中工作。该项目是 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/