簡體   English   中英

歸檔 ios 時找不到模塊“firebase_analytics”(Flutter 應用程序)

[英]Module 'firebase_analytics' not found when archiving ios(Flutter app)

幾天來我一直在嘗試存檔我的 ios 應用程序,但我一直收到此錯誤。 但是,當我在調試模式下運行時,它會成功構建。 我已經反復做了這些但仍然沒有希望:

  • 通過 xcode 添加GoogleService-info.plist
  • Flutter clean
  • 刪除podfile, podfile.lock, symlinks
  • Flutter pub get
  • pod install &&pod repo update
  • 在 xcode 啟動Runner.xcworkspace

我的播客檔案


platform :ios, '11.0'

# CocoaPods analytics sends network stats synchronously affecting flutter build latency.
ENV['COCOAPODS_DISABLE_STATS'] = 'true'

project 'Runner', {
  'Debug' => :debug,
  'Profile' => :release,
  'Release' => :release,
}

def flutter_root
  generated_xcode_build_settings_path = File.expand_path(File.join('..', 'Flutter', 'Generated.xcconfig'), __FILE__)
  unless File.exist?(generated_xcode_build_settings_path)
    raise "#{generated_xcode_build_settings_path} must exist. If you're running pod install manually, make sure flutter pub get is executed first"
  end

  File.foreach(generated_xcode_build_settings_path) do |line|
    matches = line.match(/FLUTTER_ROOT\=(.*)/)
    return matches[1].strip if matches
  end
  raise "FLUTTER_ROOT not found in #{generated_xcode_build_settings_path}. Try deleting Generated.xcconfig, then run flutter pub get"
end

require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root)

flutter_ios_podfile_setup

target 'Runner' do
  use_frameworks!
  use_modular_headers!

  flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__))
end

post_install do |installer|
  installer.pods_project.targets.each do |target|
    flutter_additional_ios_build_settings(target)
  end
end

我正在使用 Firebase 個包

  firebase_core: ^0.5.3
  firebase_analytics: ^6.3.0
  firebase_messaging: ^7.0.3
  firebase_dynamic_links: ^0.6.3

我也遇到了同樣的問題,這對我有用:

Pod file中添加

target 'Runner' do
 pod 'Firebase/Analytics'
end

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM