Flutter Error: no such module 'GoogleMaps'

3,753

Solution 1

delete all pod file. run flutter clean. then go to iOS folder and run pod init. It's create a pod file. Add pod 'GoogleMaps' this line here before target 'Runner' do

I share my pod file code

# 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

Solution 2

flutter pub get
cd ios
pod install
pod update
Share:
3,753
André Junior
Author by

André Junior

Updated on December 04, 2022

Comments

  • André Junior
    André Junior over 1 year

    I am working in a project bought by a client. The project is Fluxstore. A E-commerce built with Flutter.

    I can run the project in Android (emulator and device=). But iOS doesn't run. I get this following error:

    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
    

    I looked up on solutions for this issue in Internet but nothing works. Can somebody please help me?

    • Nelson Jr.
      Nelson Jr. almost 4 years
      Have you managed to find solution for this? If not, did you try to run flutter clean?
    • Alpit Panchal
      Alpit Panchal over 3 years
      Did you got the solution for this issue? i'm also stuck here
    • Abu Saad Papa
      Abu Saad Papa almost 3 years
      Any solution for this issue. I am facing the same issue here
  • Roshin Raphel
    Roshin Raphel over 3 years
    Please don't post only code as answer, but also provide an explanation what your code does and how it solves the problem of the question. Answers with an explanation are usually more helpful and of better quality, and are more likely to attract upvotes.