我已经把我的Flutter 包更新到了最新的版本,现在iOS不能再工作了.

当我try 更新Pod时,它显示此错误:

    [!] CocoaPods could not find compatible versions for pod "Firebase/CoreOnly":
    In Podfile:
    cloud_firestore (from `.symlinks/plugins/cloud_firestore/ios`) was resolved to 0.0.1, which depends on
    Firebase/Firestore (~> 6.0) was resolved to 6.0.0, which depends on
    Firebase/CoreOnly (= 6.0.0)

    cloud_functions (from `.symlinks/plugins/cloud_functions/ios`) was resolved to 0.0.1, which depends on
    Firebase/Functions (~> 5.18) was resolved to 5.18.0, which depends on
    Firebase/CoreOnly (= 5.18.0)

下面是我的pubspec.yaml(与Firebase相关):

firebase_core: "^0.4.0"
firebase_auth: "^0.11.0"
firebase_analytics: "^3.0.0"  
cloud_firestore: "^0.11.0+1"
cloud_functions: "^0.3.0"
firebase_storage: "^3.0.0"
firebase_messaging: "^5.0.1"

我已经采取了各种措施试图修复:

flutter clean
flutter build ios

pod install
pod update
pod repo update
pod install --repo-update

我已经将平台设置为:ios,Podfile和Xcode中的"12.1"作为构建目标,但没有任何东西能恢复工作.

下面是我的播客文件:

# Uncomment this line to define a global platform for your project
platform :ios, '12.1'

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

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

def parse_KV_file(file, separator='=')
  file_abs_path = File.expand_path(file)
  if !File.exists? file_abs_path
    return [];
  end
  pods_ary = []
  skip_line_start_symbols = ["#", "/"]
  File.foreach(file_abs_path) { |line|
      next if skip_line_start_symbols.any? { |symbol| line =~ /^\s*#{symbol}/ }
      plugin = line.split(pattern=separator)
      if plugin.length == 2
        podname = plugin[0].strip()
        path = plugin[1].strip()
        podpath = File.expand_path("#{path}", file_abs_path)
        pods_ary.push({:name => podname, :path => podpath});
      else
        puts "Invalid plugin specification: #{line}"
      end
  }
  return pods_ary
end

target 'Runner' do
  use_frameworks!

  # Prepare symlinks folder. We use symlinks to avoid having Podfile.lock
  # referring to absolute paths on developers' machines.
  system('rm -rf .symlinks')
  system('mkdir -p .symlinks/plugins')

  # Flutter Pods
  generated_xcode_build_settings = parse_KV_file('./Flutter/Generated.xcconfig')
  if generated_xcode_build_settings.empty?
    puts "Generated.xcconfig must exist. If you're running pod install manually, make sure flutter packages get is executed first."
  end
  generated_xcode_build_settings.map { |p|
    if p[:name] == 'FLUTTER_FRAMEWORK_DIR'
      symlink = File.join('.symlinks', 'flutter')
      File.symlink(File.dirname(p[:path]), symlink)
      pod 'Flutter', :path => File.join(symlink, File.basename(p[:path]))
    end
  }

  # Plugin Pods
  plugin_pods = parse_KV_file('../.flutter-plugins')
  plugin_pods.map { |p|
    symlink = File.join('.symlinks', 'plugins', p[:name])
    File.symlink(p[:path], symlink)
    pod p[:name], :path => File.join(symlink, 'ios')
  }
end

post_install do |installer|
  installer.pods_project.targets.each do |target|
    target.build_configurations.each do |config|
      config.build_settings['ENABLE_BITCODE'] = 'NO'
    end
  end
end

推荐答案

试着拨打pod repo update

如果问题未修复

在运行pod install之后,删除根目录中的Podfile.lock

Ios相关问答推荐

GraphQL iOS Apollo客户端自动持久化查询导致崩溃

视图未更新以在按下按钮时显示另一个视图

如何结合`@dynamicMemberLookup`和`ExpressibleByStringInterpolation`来实现方法链?

在iOS中使用Swift,即时更改应用语言后,立即改变外观会出现问题

在 SwiftUI 中放置全局 NavigationPath 的位置

Flutter firebase_auth 中的无效应用程序凭据/令牌不匹配

Apollo iOS 客户端代码生成:错误:无法查询字段

SwiftUI 切换语句

如何识别 SwiftUI 中点击的按钮 ID 以使该按钮动画化?

DateFormatter 使用 TimeZone 和 Locale 的特定组合返回 nil

判断Apple LiveText是否可用?

Flutter:无法构建 iOS 应用程序ARCHIVE FAILED,为设备归档时遇到错误

如何找出坐标之间的距离?

ios 崩溃 EXC_BAD_ACCESS KERN_INVALID_ADDRESS

在 Swift 中将 HTML 转换为纯文本

如何在 Swift 中使用包含多个值的查询参数构建一个 URL?

向标签栏控制器添加新标签

针对 Xcode 中的 iPad 选项

xcode 5.1:libCordova.a 架构问题

SwiftUI 应用生命周期 iOS14 AppDelegate 代码放哪里?