致命错误:找不到模块“firebase_auth”@import firebase_auth

时间:2021-02-21 20:23:50

标签: ios firebase flutter firebase-authentication cocoapods

我正在尝试对我的 iOS Flutter 使用 Firebase 身份验证。

我已经尝试了此链接中列出的所有程序,但仍然收到相同的错误。 https://github.com/FirebaseExtended/flutterfire/issues/1929

这是我运行 iOS 应用时收到的错误。

/ios/Runner/GeneratedPluginRegistrant.m:10:9: fatal error: module 'firebase_auth' not found
    @import firebase_auth;
     ~~~~~~~^~~~~~~~~~~~~
    1 error generated.
    note: Using new build system
    note: Building targets in parallel
    note: Planning build
    note: Constructing build description

这是我的 Podfile

# add pods for desired Firebase products
# https://firebase.google.com/docs/ios/setup#available-pods

# 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!
  pod 'Firebase/Analytics'
  pod 'Firebase/Core'
  pod 'Firebase/Auth'
  pod 'Firebase/Firestore'
  pod 'Firebase/Storage'

end


post_install do |pi|
    pi.pods_project.targets.each do |t|
      t.build_configurations.each do |config|
        config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '9.0'
      end
    end
end

XCode Error Message

1 个答案:

答案 0 :(得分:0)

您可能对此主题感兴趣:https://github.com/FirebaseExtended/flutterfire/issues/192

本质上它的建议是删除 Podfile 和 Podfile.lock。完成此操作后,重新运行,flutter 应该会自动为您创建正确的 Podfile。

希望有帮助。

数据库