cocoa pods最小版本错误ffmpeg套件颤动

问题描述 投票:0回答:1

所以,我最近开始在 Mac 上工作,我想构建我的 Flutter 应用程序,所以我安装了 CocoaPods 并开始寻找解决方案,但我找不到任何解决我的问题的方法,感谢任何帮助。

尝试在 pubspec.yaml 上管理我的依赖项版本,但没有解决我的问题。

我最后的想法是替换pod文件上的ffmpeg依赖版本(因为它是自动设置的),但我不知道该怎么做。

这是我的日志输出:

CocoaPods' output:
↳
      Preparing

    Analyzing dependencies

    Inspecting targets to integrate
      Using `ARCHS` setting to build architectures of target `Pods-Runner`: (``)
      Using `ARCHS` setting to build architectures of target `Pods-RunnerTests`: (``)

    Fetching external sources
    -> Fetching podspec for `FlutterMacOS` from `Flutter/ephemeral`
    -> Fetching podspec for `ffmpeg_kit_flutter` from `Flutter/ephemeral/.symlinks/plugins/ffmpeg_kit_flutter/macos`
    -> Fetching podspec for `path_provider_foundation` from `Flutter/ephemeral/.symlinks/plugins/path_provider_foundation/darwin`

    Resolving dependencies of `Podfile`
      CDN: trunk Relative path: CocoaPods-version.yml exists! Returning local because checking is only performed in repo update
      CDN: trunk Relative path: all_pods_versions_c_0_4.txt exists! Returning local because checking is only performed in repo update
      CDN: trunk Relative path: Specs/c/0/4/Flutter/3.13.0/Flutter.podspec.json exists! Returning local because checking is only performed in repo update
    [!] CocoaPods could not find compatible versions for pod "ffmpeg_kit_flutter/https":
      In Podfile:
        ffmpeg_kit_flutter (from `Flutter/ephemeral/.symlinks/plugins/ffmpeg_kit_flutter/macos`) was resolved to 6.0.3, which depends on
          ffmpeg_kit_flutter/https (= 6.0.3)

    Specs satisfying the `ffmpeg_kit_flutter/https (= 6.0.3)` dependency were found, but they required a higher minimum deployment target.

    /opt/homebrew/Cellar/cocoapods/1.14.3_1/libexec/gems/molinillo-0.8.0/lib/molinillo/resolution.rb:317:in `raise_error_unless_state'
    /opt/homebrew/Cellar/cocoapods/1.14.3_1/libexec/gems/molinillo-0.8.0/lib/molinillo/resolution.rb:299:in `block in unwind_for_conflict'
    <internal:kernel>:90:in `tap'
    /opt/homebrew/Cellar/cocoapods/1.14.3_1/libexec/gems/molinillo-0.8.0/lib/molinillo/resolution.rb:297:in `unwind_for_conflict'
    /opt/homebrew/Cellar/cocoapods/1.14.3_1/libexec/gems/molinillo-0.8.0/lib/molinillo/resolution.rb:682:in `attempt_to_activate'
    /opt/homebrew/Cellar/cocoapods/1.14.3_1/libexec/gems/molinillo-0.8.0/lib/molinillo/resolution.rb:254:in `process_topmost_state'
    /opt/homebrew/Cellar/cocoapods/1.14.3_1/libexec/gems/molinillo-0.8.0/lib/molinillo/resolution.rb:182:in `resolve'
    /opt/homebrew/Cellar/cocoapods/1.14.3_1/libexec/gems/molinillo-0.8.0/lib/molinillo/resolver.rb:43:in `resolve'
    /opt/homebrew/Cellar/cocoapods/1.14.3_1/libexec/gems/cocoapods-1.14.3/lib/cocoapods/resolver.rb:94:in `resolve'
    /opt/homebrew/Cellar/cocoapods/1.14.3_1/libexec/gems/cocoapods-1.14.3/lib/cocoapods/installer/analyzer.rb:1082:in `block in resolve_dependencies'
    /opt/homebrew/Cellar/cocoapods/1.14.3_1/libexec/gems/cocoapods-1.14.3/lib/cocoapods/user_interface.rb:64:in `section'
    /opt/homebrew/Cellar/cocoapods/1.14.3_1/libexec/gems/cocoapods-1.14.3/lib/cocoapods/installer/analyzer.rb:1080:in `resolve_dependencies'
    /opt/homebrew/Cellar/cocoapods/1.14.3_1/libexec/gems/cocoapods-1.14.3/lib/cocoapods/installer/analyzer.rb:125:in `analyze'
    /opt/homebrew/Cellar/cocoapods/1.14.3_1/libexec/gems/cocoapods-1.14.3/lib/cocoapods/installer.rb:422:in `analyze'
    /opt/homebrew/Cellar/cocoapods/1.14.3_1/libexec/gems/cocoapods-1.14.3/lib/cocoapods/installer.rb:244:in `block in resolve_dependencies'
    /opt/homebrew/Cellar/cocoapods/1.14.3_1/libexec/gems/cocoapods-1.14.3/lib/cocoapods/user_interface.rb:64:in `section'
    /opt/homebrew/Cellar/cocoapods/1.14.3_1/libexec/gems/cocoapods-1.14.3/lib/cocoapods/installer.rb:243:in `resolve_dependencies'
    /opt/homebrew/Cellar/cocoapods/1.14.3_1/libexec/gems/cocoapods-1.14.3/lib/cocoapods/installer.rb:162:in `install!'
    /opt/homebrew/Cellar/cocoapods/1.14.3_1/libexec/gems/cocoapods-1.14.3/lib/cocoapods/command/install.rb:52:in `run'
    /opt/homebrew/Cellar/cocoapods/1.14.3_1/libexec/gems/claide-1.1.0/lib/claide/command.rb:334:in `run'
    /opt/homebrew/Cellar/cocoapods/1.14.3_1/libexec/gems/cocoapods-1.14.3/lib/cocoapods/command.rb:52:in `run'
    /opt/homebrew/Cellar/cocoapods/1.14.3_1/libexec/gems/cocoapods-1.14.3/bin/pod:55:in `<top (required)>'
    /opt/homebrew/Cellar/cocoapods/1.14.3_1/libexec/bin/pod:25:in `load'
    /opt/homebrew/Cellar/cocoapods/1.14.3_1/libexec/bin/pod:25:in `<main>'

Exception: Error running pod install

这是我的 Mac Podfile:

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__))
  target 'RunnerTests' do
    inherit! :search_paths
  end
end

post_install do |installer|
  installer.pods_project.targets.each do |target|
    flutter_additional_ios_build_settings(target)
  end
end
flutter macos dart ffmpeg cocoapods
1个回答
0
投票

更新最低部署目标:更新 iOS 项目中的最低部署目标以匹配 ffmpeg_kit_flutter/https pod 的要求。您可以在 iOS 项目的 Podfile 中执行此操作。例如,如果 pod 对于 iOS 13.0 需要更高的最低部署目标,您可以这样指定: 平台:ios,'13.0'

© www.soinside.com 2019 - 2024. All rights reserved.