简体   繁体   中英

no such module 'firebase' error occurring in macbook m1

I have tried every possible answer on this site but none of them have worked. I have added a pod file but after I import Firebase, I keep getting the (No such module 'Firebase') error

i am using Macbook Air with M1

import UIKit
import Flutter
import Firebase

@UIApplicationMain
@objc class AppDelegate: FlutterAppDelegate {
  override func application(
    _ application: UIApplication,
    didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?
  ) -> Bool {
    GeneratedPluginRegistrant.register(with: self)
    FirebaseApp.configure()
    return super.application(application, didFinishLaunchingWithOptions: launchOptions)
  }
}

and here is what my pod file looks like

# Uncomment the next line to define a global platform for your project
# platform :ios, '9.0'

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

  # Pods for Runner

end

# add the Firebase pod for Google Analytics
pod 'Firebase/Analytics', '7.2-M1'
# add pods for any other desired Firebase products
# https://firebase.google.com/docs/ios/setup#available-pods


try this 1)cleaning the derived data 2)Force Quite Xcode 3)Check if you get any errors while installing the pods 4) Instead of importing Firebase try import FirebaseCore Tell me how this goes for you? Are you using Coredata in your project??

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM