And*_*ior 7 google-maps ios flutter
我正在从事一个客户购买的项目。该项目是 Fluxstore。使用 Flutter 构建的电子商务。
\n我可以在 Android 中运行该项目(模拟器和设备=)。但iOS无法运行。我收到以下错误:
\nLaunching lib/main.dart on iPhone 11 in debug mode...\nRunning pod install...\nRunning Xcode build...\nXcode build done. 138,6s\nFailed to build iOS app\nCould not build the application for the simulator.\nError launching application on iPhone 11.\nError output from Xcode build:\n\xe2\x86\xb3\n** BUILD FAILED **\n\n\nXcode's output:\n\xe2\x86\xb3\n/Users/user./projects/project/ios/Runner/AppDelegate.swift:3:8: error: no such module 'GoogleMaps'\nimport GoogleMaps\n ^\nnote: Using new build system\nnote: Building targets in parallel\nnote: Planning build\nnote: Constructing build description\nRun Code Online (Sandbox Code Playgroud)\n我在互联网上查找了该问题的解决方案,但没有任何效果。有人能帮帮我吗?
\n删除所有 pod 文件。跑步flutter clean。然后转到 iOS 文件夹并运行pod init. 它创建一个 pod 文件。pod 'GoogleMaps'在此之前添加 此行target 'Runner' do
我分享我的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
Run Code Online (Sandbox Code Playgroud)
如果该项目仍然使用 google_maps,您是否检查了 pubspec.yaml?因为如果没有,那么您应该删除AppDelegate.swift. (google_maps 和GMSServices.provideAPIKey.
这应该可以解决问题。
| 归档时间: |
|
| 查看次数: |
9659 次 |
| 最近记录: |